We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Need Pagination Example | Forum

Guna
Guna Nov 22 '14
Can anyone please explain How to add Pagination to my custom plugin?


I have seen pagination example in ADMIN_CMP_UserList (ie ow_system_plugins/base/components/user_list.php)


$onPage = 20;
$page = isset($_GET['page']) && (int) $_GET['page'] ? (int) $_GET['page'] : 1;


and


 // Paging $pages = (int) ceil($userCount / $onPage); 


$paging = new BASE_CMP_Paging($page, $pages, $onPage);

$this->addComponent('paging', $paging);


I found the code but don't know how it works.

The Forum post is edited by Guna Dec 8 '14