[consulting] limit result using views argument

Victor Kane victorkane at gmail.com
Tue Jun 8 12:43:35 UTC 2010


You can embed the view using PHP, and specify the number of results
dynamically:

  $view = views_get_view($view_name);
  $view->set_arguments(array(0 => 'all', 1 => 'typeb'));        // if you
have args
  $view->set_items_per_page(0);                                    // Here
you go!
  print $view->execute_display(0, $args);                         // default
view, include $args param if using

Victor Kane
http://awebfactory.com.ar

On Tue, Jun 8, 2010 at 9:29 AM, sidharth relhan
<sidhartharelhan at gmail.com>wrote:

> hi..
> I am creating view using view2 module. i like that it show limited result.
> Number of result it should show depend on passing value as an argument.
>
> Pager does not fit to my need.
>
> Please reply me asap.
> with regards
> sidharth.
>
> _______________________________________________
> consulting mailing list
> consulting at drupal.org
> http://lists.drupal.org/mailman/listinfo/consulting
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/consulting/attachments/20100608/c27083ce/attachment.html 


More information about the consulting mailing list