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

19 lines
640 B
Twig

{% if "events" in page.url %}
{% set taxlist = taxonomy.findTaxonomy({'event':'start' }) %}
{% else %}
{% set taxlist = children_only is defined ? taxonomylist.getChildPagesTags() : taxonomylist.get() %}
{% endif %}
{{ page.url }}
{{ base_url }}
{{ base_url ~ "/events"}}
{% if taxlist %}
<span class="tags">
{% 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 %}