Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Filter pages

Started by Muut Archive 9 years ago · 4 replies · 501 views
9 years ago

I have a field of type page, and I'm wondering if I can filter the pages by page template. Thanks!

👍 1
9 years ago

or maybe filtering by route it would be enough...

9 years ago

You need to have a collection defined in the page header in order to filter it further. The process of building a collection looks at the params to see if it should be filtered further. Have a look at how the blog skeleton handles tags: https://demo.getgrav.org/blog-skeleton/

This is possible because the blog page that describes the collection of blog posts to display is getting automatically filtered.

9 years ago

Well, it's not about this... I mean in the backend, to filter pages by routes or by template when using a pages field

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1333 9 years ago
Archive · by Muut Archive, 9 years ago
2 924 9 years ago
Archive · by Muut Archive, 9 years ago
2 4055 9 years ago
Archive · by Muut Archive, 9 years ago
1 2933 9 years ago
Archive · by Muut Archive, 9 years ago
3 1110 9 years ago