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