Hi
How works theme('pager', NULL, 5, 0);?
The problem I have are my paging menu look like this
« first‹ previous 1 2 3 next ›last »

But the only I want are « first‹ previous next ›last », I want no numbers.
How can I customize this?

Comments

jody lynn’s picture

http://api.drupal.org/?q=api/function/theme_pager/5

So, create a phptemplate_pager in your theme's template.php (this is how you override any theme funciton). Copy the code of theme_pager. Remove the line that includes pager_list.

--Zivtech--

cburschka’s picture

If you're overriding a theme function in a specific theme, do it right. Using phptemplate_ is a hack that is only necessary when you are not using a specific theme.

jody lynn’s picture

According to this handbook page http://drupal.org/node/55126 using phptemplate_ is the preferred method. If you know something more about it please have the handbook changed.

--Zivtech--

SebastianEriksson’s picture

Thanks everbody. Now I know how to:)

runeveryday’s picture

how to get that on drupal 6?

claytical’s picture

I'm trying to get a video gallery going using only the previous and next links. I know that I can comment out the first, last, and list items in the proper files, but I want to move them from the bottom of the page to the sidebars. Is there an easy way to do this? I'm using Drupal 6.

Thanks,

Clay

moksa’s picture

Hi!

i would like limit the number of direct access page dispay, actually there is "page 1,2,3,4,5,6,7,8,9 next last" i want 1,2,3,4,5 next last

how do you limit that ? i try to use $limit but nothing happen...

Thanks in advance.

bdimofte’s picture

$limit is for the number of entries per page.
You should use the $quantity parameter (Drupal 6 only)

benone’s picture

moksa: have you found out how to do it ? I need exactly the same, only 5 pages and eventually '...' before and/or after numbers.

Can you share if you've already done it ?''

Thanks in advance.

Anonymous’s picture

$quantity would be the last param of theme_pager
Another way for limit the quantity of items:

$query_count .= ' LIMIT 0, ' . $desired_number_of_items;

See this