O'Reilly logo

Drupal 6 Theming Cookbook by Karthik Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Styling the Drupal pager

When displaying a large number of items on a page, it is often required that we paginate the results in order to keep things quick and simple for the user as well as for easing the load on the server. Drupal provides a pager API which can be used to easily accomplish this. Users are able to navigate to different pages of the result set using a pager element which typically links to the next and previous pages, first and last pages, and even a range of individual pages of the set.

In this recipe, we will be looking to theme this pager element and rework it to display an abbreviated page tracker instead of listing individual pages by number.

Getting ready

We will be using the myzen theme created earlier in this book as the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required