How to place a pager on the top and bottom of the page?

I know that I need to use the theme_pager function to render the code:

http://api.drupal.org/api/function/theme_pager/6

I know that it is previously displayed in the $ content of the .tpl.php page, and if I would like its theme, I had to rewrite the theme_pager function in template.php.

I know that in Views I needed to use the $ pager variable, but I do not use Views.

What I want to know is how I can just call theme_pager, passing the "elements" variable by myself. Where can I find pager items?

EDIT:

There are no "elements", the contents of the pager are passed globally to the function.

So, if you want to add a new pager at the top of the page, you only need to call the "theme_pager" function (or yours if you rewrote it) on the page. tpl.php:

<?php print $content_top; ?> <?php echo theme('pager', null, 1, 0, array(), 9); ?> <div id="content-area"> <?php print $content; ?> </div> 
+4
source share
1 answer

You do not pass items until theme_pager .

If you pass in the same identifier: $element to a function, it should work well with an already added pager.

+1
source

All Articles