Can You Filter Pages in Panel by Toggle?

I have a team page set up in my panel. You can add “Team Member” pages. Simple.

I added a toggle field on the Team Member templates, and I wanted to know if I can split all published Team Members into two lists based on that toggle.

Said another way - Can I have two lists - both pulling in the same child templates, but each filtered by a different state of the toggle?

listed:
    extends: sections/teammembers
    headline: Team Members Toggle On
    status: listed
    layout: list
    num: '{{ page.created.toDate("Ymd") }}'
    image:
      query: page.heroImage.toFile
      cover: true

Yes, but not with a normal blueprint. Check out our “Programmable blueprints” recipe:

Or you use the pagesdisplay section plugin: PagesDisplay Section | Kirby CMS

2 Likes

Thank you!