Skip to content

Instantly share code, notes, and snippets.

@toleillo
Last active May 27, 2016 08:51
Show Gist options
  • Save toleillo/7869141 to your computer and use it in GitHub Desktop.
Save toleillo/7869141 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