Error message

The spam filter installed on this site is currently unavailable. Per site policy, we are unable to accept new submissions until that problem is resolved. Please try resubmitting the form in a couple of minutes.

Programmatically Display a Certain Page of Data with Drupal Views


Here is how you can programmatically load a Drupal view, then specify a particular page of data to show, then print out the view.

$what_page_to_show = 10;
$view = views_get_view('my_example_view');
$view->pager['current_page'] = $what_page_to_show;
print $view->preview();

Add new comment