Hi all!
Having an issue here trying to query which Project Pages pages can be added to my Work Category pages based on multiselect values…
In my example, I have two Work Category pages “Brand” and “Animation”. In my Project Page, I have a multiselect field that populates both Work Category pages by their titles. Here is the multiselect field in my project.yml
blueprint:
selectCategory:
type: multiselect
label: Work Category
options: query
placeholder: All Work
query:
fetch: site.childrenAndDrafts.filterBy('intendedTemplate', 'work-category')
text: "{{ page.title }}"
value: "{{ page.title }}"
Here is the pages field in my work-category.yml
blueprint:
categoryPages:
type: pages
label: Published
options: query
query: site.find('work').children.listed.filterBy(page.title, 'in', Selectcategory.split(',')) // This is what I'm having trouble with...
In my Project Page, this project.txt
file has the following:
Title: Project Name
----
Selectcategory: Brand, Animation
How can I have the page query above in the blueprint show this page on both “Brand” and “Animation” work category pages? When I click the Add +
in my panel to add a page to Brand or Animation, I get the following error:
Your query must return a set of pages
Hope I provided enough insight and clarification as to what I’m trying to achieve here, ha.
Thank you all for your help!