I'm a beginner and was wondering why the code below isn't working.
The issue is where ARTIST (capitalised) appears in the code for the second time. I want it to take the value from the first mention of ARTIST, but it's not doing anything. If I replace the second instance with the name of an artist, then it displays as expected.
Hopefully I'm making a basic error!
<!--Show artists that are related to current exhibition-->
{% set ARTIST = page.exhibition_artist %}
{% for artist in artist %}
{{ artist.title }}
<!--Show works that are related to current exhibition and belong to a given artist-->
{% set work = pages.find("template=work, work_exhibition=[page.path], work_artist=[ARTIST]") %}
{% for work in work %}
{{ work.title }}
{% endfor %}
{% endfor %}