Is it possible to use a select field in the query of a files field?
To be more clear: Let’s say I have a site set up in which the user can create »Exhibition« pages and »Artist« pages. When creating an exhibition page, the user can select which artists should be featured in the exhibition, via a select field:
artistInExhibition:
type: select
label: Artists featured in the exhibition
options: query
query: site.find("artists").children.published
I would now like to use the selection the user makes in this field, to tell a files field from which page it should query images. Is this possible? Or in other words, can I use the selection as a variable in the same blueprint?:
should work. But since you are on the same page, note that the values will not update before the page is actually saved because otherwise the second field doesn’t know anything about the first field.
You would have to create a custom field that listens to changes in the first field to make this works in real time.
Thank you, this does solve my initial problem… now on to the next one: What if I want to select multiple pages (in the example case »Artists«) to fetch the images from?