grav/themes/quark/templates/partials/taxonomylist.html.twig

28 lines
1018 B
Twig

{% set pages = page.collection() %}
{% set taxlist = children_only is defined ? taxonomylist.getChildPagesTags() : taxonomylist.get() %}
{% if "events" in page.url %}
<span class="tags">2
{% for tax,value in taxlist[taxonomy] %}
{% for page in pages %}
{% if page.tags contains tax %}
{% set label_class = uri.param(taxonomy) == tax ? 'label-primary' : 'label-secondary' %}
<a class="label label-rounded {{ label_class }}" href="{{ base_url }}/{{ taxonomy }}{{ config.system.param_sep }}{{ tax }}">{{ tax }}</a>
{% endif %}
{% endfor %}
{% endfor %}
</span>
{% endif %}
{% if taxlist %}
<span class="tags">2
{% for tax,value in taxlist[taxonomy] %}
{% set label_class = uri.param(taxonomy) == tax ? 'label-primary' : 'label-secondary' %}
<a class="label label-rounded {{ label_class }}" href="{{ base_url }}/{{ taxonomy }}{{ config.system.param_sep }}{{ tax }}">{{ tax }}</a>
{% endfor %}
</span>
{% endif %}