Pager_Sliding | Pager (v.1.x) vs. Pager_Sliding |
Pager_Sliding | |
PEAR Manual | |
Pager_Sliding is a class to page an array of data. It is taken as input and it is paged according to various parameters. Pager_Sliding also builds links within a specified range, and allows complete customization of the output (it even works with mod_rewrite). It is compatible with PEAR::Pager's API
This package is deprecated in favour of the new Pager v.2.x.
This simple example will page the array of alphabetical letters, giving back pages with 3 letters per page, and links to the previous two / next two pages:
|
This example shows how you can use this class with mod_rewite. Let's suppose we have a .htaccess like this:
--------- RewriteEngine on #Options FollowSymlinks RewriteBase / RewriteRule ^articles/([a-z]{1,12})/art([0-9]{1,4})\.html$ /article.php?num=$2&month=$1 [L] --------- |
|
Using more than one pager in a single page is as simple as using a different urlVar for each pager:
|
Pager_Sliding | Pager (v.1.x) vs. Pager_Sliding |
Pager_Sliding | |
PEAR Manual | |