Files
figureslibres.cc/user/themes/figureslibres/templates/partials/taxonomylist.html.twig
T
2019-09-04 18:36:55 +02:00

23 lines
605 B
Twig

{% set taxlist = children_only is defined ? taxonomylist.getChildPagesTags() : taxonomylist.get() %}
{% macro pageLinkName(text) %}
{{ text|lower|replace({' ':'_'}) }}
{% endmacro %}
{% import _self as macro %}
{% for tax,value in taxlist[taxonomy] %}
<ul class="{{ macro.pageLinkName(tax) }}">
{{ tax }}
{% set options = { items: {'@taxonomy': {'category': tax} } } %}
{% set my_collection = page.collection(options) %}
{% for i in my_collection %}
<li>
<a id="{{i.parent.folder}}" href="{{i.url}}">{{i.title}}</a>
</li>
{% endfor %}
</ul>
{% endfor %}