Jump to content

Pagination - have set limit per page but want total capped items or page number limit


Ivo
 Share

Recommended Posts

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
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...