Closed akaunderr closed 6 years ago
The proper way to do this is to take advantage of the new filtering options that were added recently for Grav collections. This has yet to be documented (i'm getting to it!), but in the meantime here's an example:
content:
items: '@self.children'
filter:
type: note
Thank you for your quick answer! I've been trying to solve this problem in the last few days. Can I post this decision on the Grav forum despite the fact that is not yet documented?
Of course, its on my "bit list of things to document" https://github.com/getgrav/grav-learn/issues/356
Just not gotten around to it yet.. busy busy!
I can not found any solution for my problem. It looks like pagination issue. If i use pagination and my collection is filtered like
{% set collection = page.collection().ofType('note') %}
i have a wrong pagination which includes an empty page. For exampe: I have page withlimit:3
and 8 children, mypage.collection
includes 8 items and page should dispalys 3 subpages. After filtering i get only 4 items in my collection and i expect that i will get 2 subpages with 3 and 1 items. But they are still 3, and there are empty subpages.