34 lines
1.1 KiB
Twig
Raw Normal View History

2019-04-02 19:54:29 +02:00
{% set taxlist = children_only is defined ? taxonomylist.getChildPagesTags() : taxonomylist.get() %}
2019-05-09 00:26:27 +02:00
{% macro pageLinkName(text) %}{{ text|lower|replace({' ':'_'}) }}{% endmacro %}
{% import _self as macro %}
2019-04-02 19:54:29 +02:00
{% if taxlist %}
2019-04-10 16:38:49 +02:00
<div class="btn-toolbar filters">
2019-04-08 18:00:38 +02:00
<div data-toggle="buttons" class="btn-group">
2019-05-09 00:26:27 +02:00
<label class="btn btn-default tous" data-filter="">
2019-04-10 16:38:49 +02:00
<input type="radio" name="options">
2019-04-08 18:00:38 +02:00
Tous
</label>
2019-06-19 16:33:20 +02:00
{% for tax,value in taxlist[taxonomy] %}
2019-04-02 19:54:29 +02:00
{% set label_class = uri.param(taxonomy) == tax ? 'label-primary' : 'label-secondary' %}
2019-06-19 16:33:20 +02:00
<label class="btn btn-default {{ macro.pageLinkName(tax) }}" data-filter="{{tax}}">
<input type="radio" name="options" >
{{tax}}
</label>
{% endfor %}
2019-05-27 17:03:03 +02:00
</div>
<div class="btn-group ">
<label class="btn-default archive">
2019-06-19 16:33:20 +02:00
{% if page.title == 'Archive' %}
<a href="/{{page.parent.title|lower}}">{{page.parent.title}}</a>
{% else %}
<a href="{{page.url}}/archive">Archive</a>
{% endif %}
2019-05-27 17:03:03 +02:00
</label>
</div>
2019-04-10 16:38:49 +02:00
</div>
2019-04-02 19:54:29 +02:00
{% endif %}