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

19 lines
640 B
Twig
Raw Normal View History

2023-01-10 20:14:28 +01:00
{% if "events" in page.url %}
2023-01-10 20:20:29 +01:00
{% set taxlist = taxonomylist.get(page.collection()|filter(page => page.header.event.start is defined)) %}
2023-01-10 20:03:24 +01:00
{% else %}
2023-01-10 20:18:24 +01:00
{% set taxlist = taxonomylist.get(page.collection()) %}
2023-01-10 20:03:24 +01:00
{% endif %}
2023-01-10 20:13:33 +01:00
2023-01-10 20:04:36 +01:00
{{ page.url }}
{{ base_url }}
2023-01-10 20:13:33 +01:00
{{ 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 %}