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

49 lines
1.1 KiB
Twig

{% 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 %}
<span class="tags">
{% 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' %}
<a class="label label-rounded {{ label_class }}" href="{{ base_url }}/{{ taxonomy }}{{ config.system.param_sep }}{{ tax }}">{{ tax }}</a>
{% endif %}
{% endfor %}
{% endfor %}
</span>
{% else %}
{% 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 %}
{% endif %}