{% if current_exhibitions %}
{% for ex in current_exhibitions %}
{% set ea = ex.artworks[0] if ex.artworks else none %}
{% set aw = ea.artwork if ea else none %}
{% set img = aw.images[0] if aw and aw.images else none %}
{% if img and img.iiif_url %}
{{ _("Current Exhibition") }}
{{ ex.title }}
{% if ex.start_date or ex.end_date %}
{% if ex.start_date %}{{ ex.start_date|ch_date }}{% endif %}
{% if ex.start_date and ex.end_date %} – {% endif %}
{% if ex.end_date %}{{ ex.end_date|ch_date }}{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% set forth_first = [true] %}
{% for ex in forthcoming_exhibitions %}
{% for ea in ex.artworks %}
{% set aw = ea.artwork %}
{% set img = aw.images[0] if aw and aw.images else none %}
{% if img and img.iiif_url %}
{% if forth_first[0] and not current_exhibitions %}
{% set _x = forth_first.pop() %}
{% set _x = forth_first.append(false) %}
{% endif %}
{% endfor %}
{% endfor %}
{% for aw in carousel_artworks %}
{% set img = aw.images[0] if aw.images else none %}
{% if img and img.iiif_url %}
{% if aw.artist %}{{ aw.contact_artist.first_name if aw.contact_artist else (aw.artist.first_name if aw.artist else "") }} {{ aw.contact_artist.last_name if aw.contact_artist else (aw.artist.last_name if aw.artist else "") }}{% endif %}