grav-theme-future2021/templates/partials/taxonomylist.html.twig

20 lines
702 B
Twig

<!-- Taxonomy list -->
{% set taxlist = children_only is defined ? taxonomylist.getChildPagesTags(of_page, children_only) : taxonomylist.get() %}
{% if taxlist %}
<div class="sidebar-content">
<header>
<h3>{{ 'FUTURE.SIDEBAR.TAGS.HEADLINE'|t }}</h3>
</header>
<ul class="menulink">
<li>
{% for tax,value in taxlist[taxonomy] %}
{% if value is not empty %}
{% set active = uri.param(taxonomy) == tax? 'active' : '' %}
<a class="tags {{ active }}" rel="nofollow" href="{{ base_url }}/{{ taxonomy }}{{ config.system.param_sep }}{{ tax }}">{{ tax }}</a>
{% endif %}
{% endfor %}
</li>
</ul>
</div>
{% endif %}