…I want to show, in ‘artist-item’, a list of all ‘exhibition-item’ pages whose ‘participatingartists’ tags field contains the ‘artist-item’ page’s title.
So, in the ‘artist-item’ panel page whose title field is ‘Kirby Person’, I want to show all ‘exhibition-item’ pages whose ‘participatingartists’ field contains ‘Kirby Person’.
I figured this would be done with a pages section, but I only see how to set up the parent of the pages section, but not how to filter the pages by field contents.
I am refering of course to a query akin to what we can do with the image:
image:
query: page.image.findBy("name", "cover")
I also looked at the pages field, but I don’t want the user to select anything, I want only to show the pages, and that the user can click on them to open them of course.
Short answer: Yes.
Slightly longer version: A standard pages section doesn’t have a query option. As you already said, there is only a parent options, with the possibility to filter by template and status, nothing else.
trying to emulate this example, but that does not seem to work
the logic was to find children of the exhibitions page, whose ‘artists’ tag field, contains the title of the page we are in.
The code looks backwards, as if it tries to find the tags in the title not the other way around, but I presume the first argument must be a field from the looped pages. I also am unsure if I can refer to the actual page’s title as such. Always a bit lost with query language and filtering.