Ivo Posted November 12, 2015 Posted November 12, 2015 Hi All, Is there a simple way to add a pagination page limit or total item count limit to a pagination? It's for a recipe site (latest recipes) where I would like to limit the total item count to say 24 or 4 paginated pages of 6 items. Code is as follows ($page->latest set to 6) $items = $pages->find("template=recipe, limit=$page->latest, sort=-modified"); $pagination = $items->renderPager(); foreach ($items as $item) { display recipe..etc... } I tried truncating the $items array but to no avail. cheers, Ivo
LostKobrakai Posted November 12, 2015 Posted November 12, 2015 You can fake the PageArray, that the pagination is based on. $pa = new PageArray(); $pa->setTotal($total)->setLimit($limit)->setStart($start); $pager = $this->modules->get('MarkupPagerNav'); $pagination = $pager->render($pa); 4
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now