views:

67

answers:

1

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

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

I know that it is pre rendered into the $content of the page.tpl.php and if I would like to theme it I only had to overwrite the theme_pager function into template.php.

I know that in Views I only had to use the variable $pager, but I'm not using Views.

What I want to know is how I could simply call theme_pager passing a variable "items" by myself. Where I can find the "items" of the pager?

EDIT:

There is no "items", the content of the pager is passed globally to the function.

So if you want to add a new pager at the top of your page you only have to call the "theme_pager" function (or yours if you have overwrite 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>
+1  A: 

You don't pass items to theme_pager.

If you pass in the same id: $element to the function, it should work fine with the pager that's already is added.

googletorp
I edited my question with my solution.
FR6

related questions