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

28 lines
1012 B
Twig
Raw Normal View History

2023-01-10 22:36:34 +01:00
{% set pages = page.collection() %}
2023-01-10 22:47:04 +01:00
{% set taxlist = children_only is defined ? taxonomylist.getChildPagesTags() : taxonomylist.get() %}
2023-01-10 22:13:15 +01:00
2023-01-10 22:47:04 +01:00
{% if "events" in page.url %}
2023-01-10 22:13:15 +01:00
2023-01-10 22:47:04 +01:00
<span class="tags">2
{% for tax,value in taxlist[taxonomy] %}
{% for page in pages %}
2023-01-10 22:47:40 +01:00
{% if tax in page.tags %}
2023-01-10 22:47:04 +01:00
{% 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 %}
2023-01-10 22:22:38 +01:00
{% endfor %}
2023-01-10 22:47:04 +01:00
{% endfor %}
</span>
2023-01-10 22:04:21 +01:00
2023-01-10 20:03:24 +01:00
{% endif %}
2023-01-10 20:13:33 +01:00
{% if taxlist %}
2023-01-10 21:46:02 +01:00
<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 %}