34 lines
1010 B
Twig
34 lines
1010 B
Twig
{% if "events" in page.url %}
|
|
{% set tagList = [] %}
|
|
{% for item in page.collection %}
|
|
{% for tag in page.collection.taxonomy(taxonomy) %}
|
|
{% if tag not in tagList %}
|
|
{% set tagList = tagList|set([tag]) %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
|
|
|
|
{% set tagCounts = taxonomylist.get(tagList) %}
|
|
{% set sorted_tags = tagCounts|sort( 'count' ) %}
|
|
<ul>
|
|
{% for tag in sorted_tags|slice(0, 5) %}
|
|
<li>{{ tag.name }} ({{ tag.count }} mal verwendet)</li>
|
|
{% endfor %}
|
|
</ul>
|
|
|
|
|
|
{% else %}
|
|
{% set taxlist = children_only is defined ? taxonomylist.getChildPagesTags() : taxonomylist.get() %}
|
|
{% endif %}
|
|
|
|
|
|
{% 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 %}
|