Manual:Pager.php

The IndexPager class provides useful functions for paging results of MySQL query fieldset results. The IndexPager class is used for example in the special page Special:Categories.

Usage example
The first step to use the IndexPager in your special page extensions is creating named for example " " that extends one on these three class: Each of these three class (,  and  ) extends the   class.
 * is used when you want to list your items in alphabetical order
 * is used when you want to list your items in a reverse cronological order
 * is used when you want display items in table rows

Usually you should only have to override few methods in your class: For example, if you want to list all pages in the NS0 using a pager, you should do something like that:
 * let the pager know the SQL query you want to execute. It should return an associative array with the following elements:
 * table(s) used in the query
 * field(s) for passing to Database::select, may be * (all fields in table)
 * an array containing conditions for WHERE clause
 * an arry containing other options (such as GROUP BY)
 * gets an argument,, which is a row object from the result fieldset. The function should return a string containing the item formatted as you need.
 * getIndexField should return the name of the table field used for indexing and ordering results.

In your special page body than you have to: For example:
 * create a new  class
 * use the  method for putting the navigation bar on the top and on the bottom of the page
 * use the  methond for putting the list of the items