Update taxonomylist partial template

This commit is contained in:
pmoreno.rodriguez 2024-05-15 15:49:04 +02:00
parent 2b75b91297
commit a4ae56c25d
2 changed files with 23 additions and 22 deletions

View file

@ -37,17 +37,8 @@
{% include 'partials/relatedpages.html.twig' %}
</div>
{% endif %}
{% if config.plugins.taxonomylist.enabled %}
{% set taxlist = children_only is defined ? taxonomylist.getChildPagesTags() : taxonomylist.get() %}
{% if taxlist %}
<!-- Taxonomy list -->
<div class="sidebar-content">
<header>
<h3>{{ 'FUTURE.SIDEBAR.TAGS.HEADLINE'|t }}</h3>
</header>
{% include 'partials/taxonomylist.html.twig' with {'base_url':new_base_url, 'taxonomy':'tag'} %}
</div>
{% endif %}
{% if config.plugins.taxonomylist.enabled and page.template == 'blog' %}
{% include 'partials/taxonomylist.html.twig' with {'base_url':new_base_url, 'taxonomy':'tag', children_only: true, of_page: page.blog} %}
{% endif %}
{% if config.plugins.feed.enabled %}
<!-- Syndicate -->
@ -73,7 +64,7 @@
</ul>
</div>
{% endif %}
{% if config.plugins.login.enabled and icon_login%}
{% if config.plugins.login.enabled and icon_login %}
<!-- Login button -->
<div>
<ul class="actions stacked">

View file

@ -1,10 +1,20 @@
<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>
<!-- Taxonomy list -->
{% set taxlist = children_only is defined ? taxonomylist.getChildPagesTags(of_page) : 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 %}