Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7415519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:19:07+00:00 2026-05-29T07:19:07+00:00

I would like to change the default limit of pagers in Drupal 7. I’ve

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T07:19:07+00:00Added an answer on May 29, 2026 at 7:19 am

    Drupal 7

    Seems like for Drupal 7 the only way to change the limit is to set it in your query.

    For example:

    // Select nid from published nodes with 20 pager limit 
    $query = db_select('node', 'n')
        ->condition('status', 1)
        ->extend('PagerDefault')
            ->limit(20)
        ->fields('n', array('nid'));
    
    $results = $query->execute();
    

    Drupal 6

    Just copy the default theme_pager() function into your template.php file with the name yourthemename_pager() where yourthemename is the name of your theme and change the $limit argument to number you need.

    Example with limit to 20:

    // In your case theme's name is "tao"
    function tao_pager($tags = array(), $limit = 20, $element = 0, $parameters = array(), $quantity = 9) {
        global $pager_page_array, $pager_total;
        // all code of function
        // ....
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know how to change default Azure SDK local deploy directory?
I would like to change the default style for vector features in a map
I would like to change my default route values. Right now, I have: routes.MapRoute(
I would like to change visual studio's default configurations (Debug,Release). That is, change the
I would like to change the cursor from default to pointer when the mouse
I would like to change the color of buttons in Visual Studio 2010. But
I would like to change the default behavior of how the admin recent changes
I would like to change the default behavior of Zend_Form, so that whenever the
While making a WPF application I would like to change the default FocusVisualStyle (the
I would like to change the wordpress default query to orderby title when viewing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.