This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
I use simple paginate()
method to obtain results from the database and then render the pagination itself with
{{ __SELF__.items.render()|raw }}
My problem is that I want to list two different kinds of items on the same page and so I need two paginations as well but right now they share one pagination variable page
. Is there a way how to easily change one of the pagination variables page
into something else so that I use for example variable page
for the first pagination and page2
for the second pagination? Thanks.
I'd do AJAX pagination for this. Pass your page variable in the data.
I'd also have two separate routes for each of the items you're paginating. So, if you have products and news for example you could paginate both via AJAX on the home page but also keep a /news and /products with a page Id in the URL so they can be linked to easily.
Just my thoughts, but I've implemented this structure in the past.
1-2 of 2