We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum
Paginate categories inside collection
Is it possible to paginate categories that are stored inside a collection item?
- I have a collection called Flooring Industries, which could be made up of things like Hotels, Retail, Education, etc.
- Each Flooring Industry collection has flooring 'categories' attached to it e.g. Retail might have flooring line categories such as Lines, Stripes, Squares, etc.
I need to show each industry, and its associated categories.
On an example page, Andover and Fernlea are flooring lines (Perch categories) attached to the Serviced Offices collection. I would like to paginate the categories here.
I initially thought that if I paginate the collection this would work, but instead, Perch paginates the collection item. e.g. something like the following would paginate Hotels, Retail, Education, rather than Lines, Stripes, Squares:
perch_collection('Flooring Catalogue Industries', [ 'filter' => 'name_link', 'match' => 'eq', 'value' => perch_get('level3'), 'template' => 'flooring_catalogue/industries/industry_categories.html', 'paginate' => true, 'count' => 1, ]);
So what I need to do is paginate the categories inside this collection.
My guess is that:
- I might have missed something obvious and this is easily achieved, or…
- I might need to do something with a callback
Any suggestions appreciated!
Want to reply to this thread?Login with Perch