Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Filter pages

Started by Muut Archive 10 years ago · 4 replies · 626 views
10 years ago

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

👍 1
10 years ago

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

10 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.

10 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 2569 9 years ago
Archive · by Muut Archive, 9 years ago
2 1691 9 years ago
Archive · by Muut Archive, 9 years ago
2 4983 9 years ago
Archive · by Muut Archive, 9 years ago
1 3809 9 years ago
Archive · by Muut Archive, 9 years ago
3 1800 9 years ago