2023-01-10 22:14:16 +01:00
|
|
|
|
2023-01-10 20:14:28 +01:00
|
|
|
{% if "events" in page.url %}
|
2023-01-10 22:18:48 +01:00
|
|
|
{% set collection = page.collection()|filter(page => page.header.event.start is defined) %}
|
|
|
|
|
2023-01-10 22:04:21 +01:00
|
|
|
{% set tagList = [] %}
|
2023-01-10 22:18:48 +01:00
|
|
|
{% for item in collection %}
|
2023-01-10 22:10:56 +01:00
|
|
|
{% for tag in page.collection.taxonomy(taxonomy) %}
|
2023-01-10 22:16:25 +01:00
|
|
|
{{ tag }}
|
2023-01-10 22:04:21 +01:00
|
|
|
{% if tag not in tagList %}
|
2023-01-10 22:06:20 +01:00
|
|
|
{% set tagList = tagList|set([tag]) %}
|
2023-01-10 21:55:01 +01:00
|
|
|
{% endif %}
|
2023-01-10 21:28:33 +01:00
|
|
|
{% endfor %}
|
2023-01-10 21:55:01 +01:00
|
|
|
{% endfor %}
|
2023-01-10 22:06:20 +01:00
|
|
|
|
2023-01-10 22:10:56 +01:00
|
|
|
|
2023-01-10 22:04:21 +01:00
|
|
|
{% set tagCounts = taxonomylist.get(tagList) %}
|
|
|
|
{% set sorted_tags = tagCounts|sort( 'count' ) %}
|
2023-01-10 22:13:15 +01:00
|
|
|
|
|
|
|
|
2023-01-10 22:04:21 +01:00
|
|
|
<ul>
|
2023-01-10 22:16:25 +01:00
|
|
|
{% for tag in sorted_tags|slice(0, 5) %}
|
2023-01-10 22:04:21 +01:00
|
|
|
<li>{{ tag.name }} ({{ tag.count }} mal verwendet)</li>
|
|
|
|
{% endfor %}
|
2023-01-10 21:51:39 +01:00
|
|
|
</ul>
|
2023-01-10 21:28:33 +01:00
|
|
|
|
2023-01-10 22:04:21 +01:00
|
|
|
|
2023-01-10 20:03:24 +01:00
|
|
|
{% else %}
|
2023-01-10 20:38:30 +01:00
|
|
|
{% set taxlist = children_only is defined ? taxonomylist.getChildPagesTags() : taxonomylist.get() %}
|
2023-01-10 20:03:24 +01:00
|
|
|
{% endif %}
|
2023-01-10 16:09:01 +01:00
|
|
|
|
2023-01-10 20:13:33 +01:00
|
|
|
|
2023-01-10 16:09:01 +01:00
|
|
|
{% if taxlist %}
|
2023-01-10 21:46:02 +01:00
|
|
|
<span class="tags">2
|
2023-01-10 16:09:01 +01:00
|
|
|
{% 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 %}
|