August 04 2014

Joomla use JPagination in application

Tagged Under :

Joomla
To use JPagination inside the application. You need include the pagination classes inside the application.

You can using jimport to include the Pagination classes.
jimport('joomla.html.pagination');
After that, pass the value to the class.
$total = 100; //the total number of items in a list
$limitstart = 0; //the offset of the item at which to start
$limit = 15; //the number of items to display per page
$pageNav = new JPagination($total, $limitstart, $limit);
After that, echo the pagination output using getListFooter.
echo $pageNav->getListFooter();
Now you can refresh the page and you will able see the pagination output as below: joomla pagination

Make a Comment

*

code