Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save modcab/661bdcb2a590614c87cd5ffc3af96ef5 to your computer and use it in GitHub Desktop.
Save modcab/661bdcb2a590614c87cd5ffc3af96ef5 to your computer and use it in GitHub Desktop.
Drupal Views change items per page programmatically
<?php
/**
* Implements hook_views_pre_build ()
*/
function MODULENAME_views_pre_build(&$view) {
if($view->name == "VIEWNAME") {
$view->items_per_page = 15;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment