{% set taxlist = children_only is defined ? taxonomylist.getChildPagesTags() : taxonomylist.get() %}
{% set pages = page.collection()|filter(page => page.header.event.start is defined) %}
{% for p,v in pages %}
{{ p }}
{% endfor %}
{% if "events" in page.url %}
{% for tax,value in taxlist[taxonomy] %}
{% for page,v in pages %}
{% 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 %}