<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
    <loc>{{ siteUrl('/') }}</loc>
    <changefreq>daily</changefreq>
    <priority>1.0</priority>
</url>
<url>
    <loc>{{ siteUrl('exhibitions') }}</loc>
    <changefreq>daily</changefreq>
    <priority>0.9</priority>
</url>
<url>
    <loc>{{ siteUrl('theatre') }}</loc>
    <changefreq>daily</changefreq>
    <priority>0.9</priority>
</url>
<url>
    <loc>{{ siteUrl('exhibitions/upcoming') }}</loc>
    <changefreq>daily</changefreq>
    <priority>0.7</priority>
</url>
<url>
    <loc>{{ siteUrl('theatre/upcoming') }}</loc>
    <changefreq>daily</changefreq>
    <priority>0.7</priority>
</url>
<url>
    <loc>{{ siteUrl('exhibitions/map') }}</loc>
    <changefreq>daily</changefreq>
    <priority>0.6</priority>
</url>
<url>
    <loc>{{ siteUrl('theatre/map') }}</loc>
    <changefreq>daily</changefreq>
    <priority>0.6</priority>
</url>
<url>
    <loc>{{ siteUrl('exhibitions/a-z') }}</loc>
    <changefreq>weekly</changefreq>
    <priority>0.5</priority>
</url>
<url>
    <loc>{{ siteUrl('theatre/a-z') }}</loc>
    <changefreq>weekly</changefreq>
    <priority>0.5</priority>
</url>
{% set exhibitions = craft.entries()
    .section('exhibitions')
    .status('live')
    .all()
%}
{% for entry in exhibitions %}
{% if entry.url %}
<url>
    <loc>{{ entry.url | replace({'&': '&amp;'}) }}</loc>
    <lastmod>{{ entry.dateUpdated | date('Y-m-d') }}</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.6</priority>
</url>
{% endif %}
{% endfor %}
{% set shows = craft.entries()
    .section('theatre')
    .status('live')
    .all()
%}
{% for entry in shows %}
{% if entry.url %}
<url>
    <loc>{{ entry.url | replace({'&': '&amp;'}) }}</loc>
    <lastmod>{{ entry.dateUpdated | date('Y-m-d') }}</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.6</priority>
</url>
{% endif %}
{% endfor %}
</urlset>