Filter pages

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

1 Like

or maybe filtering by route it would be enough…

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.

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

Ah, currently the pages field does not have those capabilities. Please create a ticket for that: https://github.com/getgrav/grav-plugin-admin/issues