Hello,
I am building a website using the one-pager cookbook. I have some pages with have parts and subpages. In the templates and frontend, there is no issue to separate the parts and the subpages of a page with filterBy, but in the panel, the same query doesn’t work. I’m trying to add a field of type pages, which should only include the subpages and exclude the parts.
sections:
parts:
headline: Sections
type: pages
status: all
info: "{{ page.intendedTemplate }}"
image: false
templates:
- section-banniere
- section-1r
- section-1r2c
- section-2r2c
- section-3c
- section-4img
- section-media
subpages:
headline: Subpages without parts
type: pages
multiple: true
options: query
query: page.children.listed.filterBy("intendedTemplate", "!*=", "section")
This query works for a select, but not with a pages field. I checked this solution, but I didn’t find a way to make it work with a collection too. Is there a way to use the query language to filter these pages or is it better to use a plugin like Kirby Modules?
Thanks,