{% if "events" in page.url %} {% set taxlist = taxonomylist.get(page.collection()|filter(page => page.header.event.start is defined)) %} 1 {% else %} {% set taxlist = taxonomylist.get(page.collection()) %} 2 {% endif %} {% if taxlist %} {% for tax,value in taxlist[taxonomy] %} {% set label_class = uri.param(taxonomy) == tax ? 'label-primary' : 'label-secondary' %} {{ tax }} {% endfor %} {% endif %}