I have a series of categories and my site settings contains a “featuredcategory” select field. A user can choose a category from this (for example Photography). After that I have a multiselect field and I would like to only show pages that exist within the previously selected category. So I choose Photography in the select, the multiselect shows the post tagged with Photography and then I can make a selection from there.
If I write a specific category into the filterBy query (eg “categories/photography”) it shows the category posts correctly but ideally, I would like the select field to control whats presented under the mutliselect. Below is my blueprint but perhaps I’m missing something or this isn’t possible, are nested queries like this doable? Any help much appreciated.
Seán
featuredcategory:
label: Featured Category
type: select
options: query
query:
fetch: site.find("categories").children
text: "{{ page.title }}"
value: "{{ page.slug }}"
featuredcatselection:
label: Featured Category Selection
type: multiselect
options: query
query:
fetch: site.index.filterBy("categories", site.featuredcategory)