Delivering the best Add-Ons in more than 37 languages.

中文(简体), English, हिन्दी/हिंदी, Español/Castellano, العربية, Русский язык, Français, 中文 (台灣), বাংলা, Bahasa Indonesia, اردو, Português, Deutsch, Bahasa Melayu (بهاس ملايو‎), 日本語 (にほんご), فارسی, Italiano, తెలుగు, Türkçe, ગુજરાતી, Język polski/polszczyzna, Tiếng Việt, ಕನ್ನಡ, Українська мова, ไทย
PHP Scripts / Database Abstractions

Pagination Class 3.0

— Add-On to

Subscribe to our feed to stay up to date!

New! Follow us as you want it!

Pagination Class 3.0 - CodeCanyon Item for Sale


Ad: Bluehost hosting
ONLINE DOCS ONLINE DEMO – ajax version – refresh model UPDATE : 22.02.2012
  • correction of a small bug in 7_code.php file
UPDATE : 14.02.2012
  • 1 minor update to class_pagination.php – a variable replaced.
  • 1 new navigation model – numbers with refresh and ”...” between them, like 1 2 3…7 8 9…12 13 14 – settings can be made.
  • 1 minor change to all refresh navigation models – the page variable “p” from the _code.php file is no more in the nav file but where the class is called, in antelink variable, now you can change the variable name easily if you need another variable in URL
  • 1 new css class added


This is a php class made for split into pages content from mysql tables.

You have the two methods of paging content with refresh and with ajax, 3 navigation systems and several template files for displaying items in the database.

You can make settings in three ways:

from the settings file - set default - by admin when you add your class - overwrite the default - by admin through the navigation properties bar from browser - by user

How it works?

This class make a query into mysql in the specified table with some requests made in “where” field and then display content using a template, like this:

The class is called after you set 4 attributes: table, where field, template to display, page number It is checked if other attributes are set when the class is called. if attributes are set, class initializes the variables with these values, if attributes are not set, it initializes the variables with values from settings file Select rows from database Calculate how many pages are displayed and write information from the database using the selected template Import the type and style of navigation system

Ajax version makes the above steps first time, when it displays the first page. After that, the remaining pages are displayed dynamically using JavaScript and XML generated by php.

If you need more articles in the same row you have to set float:left to the template class. Number of articles in the same row is set in the settings file.

This class has 4 required attributes:

table name where - that can be 1 for select all rows name of the template file current page number

The other attributes are optional:

sortby - sort rows by this field from mysql table nav - name of the file for the navigation model, select it from nav folder show - set number of articles from mysql per page arrange - sort rows "asc" or "desc"
//only for non ajax system antelink - part of url that need to be placed in front of the page number e.g. index.php?id=1&page= postlink - part of url that need to be placed after page number e.g. &sid=1&title=something

Settings You can set some default values for

nav - navigation system model sortby - field name arrange - asc or desc page - start page number - default is 1 show - number of rows per page item_in_row
ONLINE DOCS ONLINE DEMO – ajax version – refresh model

Other components in this categoryAll components of this author
CommentsFrequently asked questions and answers


12 March 10

Last Update:

Compatible Browsers:
IE6, IE7, IE8, IE9, Firefox, Safari, Opera, Chrome

Files Included:
JavaScript JS, CSS, PHP, SQL

Software Version:
PHP 4.x, PHP 5.x, PHP 5.0 - 5.2, PHP 5.3, MySQL 4.x, MySQL 5.x


eCommerce, eCommerce, All Items, ajax, ajax pagination, content, content pagination, mysql, mysql ajax pagination, mysql pagination, navigation, pagination, paging, split, templates