Got another panel idea I’m trying to solve here. In one of my blueprints, I have a
pages section that I want to allow to be sorted one of two ways: The subpages will either be sorted manually or by date based on what the user chooses. Here’s how I tried to handle it…
casestudies_manual: headline: Case Studies (Manual Sorting) type: pages template: - casestudy when: studies_sort: true casestudies_date: headline: Case Studies (Date Sorting) type: pages sortBy: date desc template: - casestudy when: studies_sort: false studies_sort_options: type: fields fields: studies_sort: label: Sort By type: toggle width: 1/4 text: - Date - Manual
On the frontend, I can look for that
studies_sort field and change the sorting there, but on the backend, the
when conditional isn’t effective. I’m seeing both manual and date sorted displays.
It feels like, from the docs, this should have worked, but I’m noticing in the docs that Kirby has a when conditional for pages fields but not pages sections.