taxonomylist.html.twig 733 B

1234567891011121314151617181920212223242526
  1. {% set taxlist = children_only is defined ? taxonomylist.getChildPagesTags() : taxonomylist.get() %}
  2. {% macro pageLinkName(text) %}
  3. {{ text|lower|replace({' ':'_', 'é':'e'}) }}
  4. {% endmacro %}
  5. {% import _self as macro %}
  6. {% for tax,value in taxlist[taxonomy] %}
  7. <ul>
  8. <span class="cat">{{ tax }}</span>
  9. {% set options = { items: {'@taxonomy': {'category': tax} } } %}
  10. {% set my_collection = page.collection(options) %}
  11. {% for i in my_collection %}
  12. {% if i.media.images|first %}
  13. <li class="{{i.parent.folder}}">
  14. <a id="{{i.parent.folder}}" href="{{i.url}}">{{i.title}}</a>
  15. {% set image = page.media.images|first %}
  16. </li>
  17. {% endif %}
  18. {% endfor %}
  19. </ul>
  20. {% endfor %}