Projects / Zebra_Pagination

Zebra_Pagination

Zebra_Pagination is a generic pagination PHP library which automatically generates HTML navigation links (next, previous, specific pages) given the total number of records and the number of records to be displayed per page. It can generate links both in natural and in reverse order, can be easily localized, supports page propagation via GET or via URL rewriting, lets the appearance be easily customized through CSS, and is SEO-friendly (it uses rel="prev" and rel="next", and solves the problem of duplicate content on the first page without navigation and the first page having the page number in the URL). Please note that this is a *generic* pagination PHP library, meaning that it does not display any records. It is up to the developer to fetch the actual data and display it based on the information returned by this class. The advantage is that it can be used to paginate records coming from any source (arrays, database, etc). Zebra_Pagination's code is heavily commented and generates no warnings/errors/notices when PHP's error reporting level is set to E_ALL.

Tags
Licenses
Operating Systems
Implementation

Recent releases

  •  06 Feb 2013 19:33

    Release Notes: This version fixes some bugs when having pagination links shown in reverse order; Also, position of next/previous links can now be changed so instead of being on the outside of the links to individual pages, they can now also be shown either to the left or to the right.

    •  28 Jan 2013 16:21

      Release Notes: This release drops support for PHP4 (the library now requires PHP5+), fixes a bug related to parts of the URL having HTML entities (these would wrongly be encoded again by the library when generating the pagination links), makes "next page" and "previous page" links show their associated labels by default (labels were previously hidden from the library's stylesheet file), lets labels be changed/localized with the newly-added "labels" method, and makes the "next page" and "previous page" links always visible instead of just there when there were more pages than the value of selectable pages.

      •  14 Oct 2011 20:14

        Release Notes: A bug where query strings were deleted if URLs were SEO friendly was fixed. A new method was added for setting whether the script should add a trailing slash to URLs when generating SEO friendly URLs.

        •  18 Sep 2011 17:14

          Release Notes: In version 1.2, the link to the first page does not include the "page" parameter anymore, in order to avoid duplicate content. Some optimizations were made in the code.

          •  20 Mar 2011 14:57

            Release Notes: A bug was fixed where the "padding" method was not working. Another bug was fixed where the "set_page" method was not working correctly. Also, from now on, when there is a single page available, the pagination links are not displayed anymore. The default style was tweaked a bit.

            Screenshot

            Project Spotlight

            OpenStack4j

            A Fluent OpenStack client API for Java.

            Screenshot

            Project Spotlight

            TurnKey TWiki Appliance

            A TWiki appliance that is easy to use and lightweight.