Friedrich Posted August 1, 2015 Posted August 1, 2015 Hello everybody. I have a question to the paginator module. I think this is a often used module so I posted it in the "General Support". On my page is a image-gallery with a lot of galleries. So I use the paginator there. It works also very well. But then I have a "Last Changes"-section further down in the footer. If I go to page 2 in the image gallery, the entries of the "last changed" section always changes. How can I avoid this? How can I limit the paginator to one query? $galleries = $page->children("sort=-created,limit=6"); ... galleries->renderPager() Only this query should be affected. But it also has effect on this query: $lastGalleries = $pages->find("template=gallery,sort=-created,limit=10");
adrian Posted August 1, 2015 Posted August 1, 2015 Simply add start=0 to the selector in your other queries.
Friedrich Posted August 1, 2015 Author Posted August 1, 2015 Oh... so simple? Haha, it worked. Thank you!!! Do I always have to add this on every find() where I don't want to use the pagination?
LostKobrakai Posted August 1, 2015 Posted August 1, 2015 Only if you need to use "limit" in those selectors as well. 1
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