Fieldtype query propertie - Filter by field on page

Hi,

i have a toggle field on every page and i want to filter by true/false in the pagefield.
I tried it like that, but didn’t figured out the correct way to solve it:

query: site.mainNavigation.isTrue

greetings

query: site.mainNavigation.toPages.filterBy('nameOfToggleField', true)
```
      pages:
        type: pages
        label: Seiten
        layout: list
        query: site.children.filterBy('mainNavigation', true)
        create:
          default
          blog-item

Thats would work for me i think but for some reason the pages collection stys always the same, even if i do smth like that:

query: site.find('dfggfds')

which should return no page i guess (because the name does not exist), the collection still shows every existing page.

You are using a pages section, not a field. A section doesn’t have a query option, therefore this cannot work.

If you want to use a section in combination with a query, you can use the pagesdisplay section plugin:

Note that this doesn’t allow adding new pages.

Ah i see, many thanks!