I would like to change the default limit of pagers in Drupal 7.
I’ve done some research, but without succes.
I know that I have to do it in the theme’s template.php but don’t know how.
Is this comment: http://api.drupal.org/api/drupal/includes–pager.inc/function/theme_pager/6#comment-693 they show a way to alter the pager, but when I add this to my template.php, I get several errors like:
Notice: Undefined index: < in theme_pager_previous() (regel 489 van /home/vhosts/rolandkedde.nl/subdomains/webshop/httpdocs/includes/pager.inc).
Notice: Undefined index: n in theme_pager_next() (regel 528 van /home/vhosts/rolandkedde.nl/subdomains/webshop/httpdocs/includes/pager.inc).
Notice: Undefined index: n in theme_pager_next() (regel 528 van /home/vhosts/rolandkedde.nl/subdomains/webshop/httpdocs/includes/pager.inc).
Notice: Undefined index: n in theme_pager_next() (regel 529 van /home/vhosts/rolandkedde.nl/subdomains/webshop/httpdocs/includes/pager.inc).
Notice: Undefined index: n in theme_pager_next() (regel 531 van /home/vhosts/rolandkedde.nl/subdomains/webshop/httpdocs/includes/pager.inc).
Recoverable fatal error: Argument 1 passed to drupal_get_query_parameters() must be an array, string given, called in /home/vhosts/rolandkedde.nl/subdomains/webshop/httpdocs/sites/all/themes/tao/template.php on line 402 and defined in drupal_get_query_parameters() (regel 408 van /home/vhosts/rolandkedde.nl/subdomains/webshop/httpdocs/includes/common.inc).
I hope you guys can tell me a way how to do/fix this.
PS. Sorry for my bad English.
Drupal 7
Seems like for Drupal 7 the only way to change the limit is to set it in your query.
For example:
Drupal 6
Just copy the default
theme_pager()function into yourtemplate.phpfile with the nameyourthemename_pager()whereyourthemenameis the name of your theme and change the$limitargument to number you need.Example with limit to 20: