categories.html.twig 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. {% extends 'partials/base.html.twig' %}
  2. {% set bodyclass = "categories" %}
  3. {% block content %}
  4. <nav class="categories">
  5. {% include 'partials/tagslist.html.twig' with {'base_url':"/categories/", 'taxonomy':'tag', 'display':'inline'} %}
  6. </nav>
  7. {% set contents = page.collection %}
  8. {% set taxlist = taxonomylist.get() %}
  9. <div id="categories-content" class="grid">
  10. {% for tax,value in taxlist['client'] %}
  11. {% set posts = taxonomy.findTaxonomy({'client':tax}) %}
  12. {% set disposts = {} %}
  13. {% for p,v in posts %}
  14. {% if v in contents %}
  15. {% set disposts = disposts|merge({(p):v}) %}
  16. {% endif %}
  17. {% endfor %}
  18. {% if disposts|length %}
  19. <section class="client-block client-block-text grid-block columns large-3 medium-6 small-12">
  20. <h3>{{ tax }}</h3>
  21. <ul>
  22. {% for post in disposts %}
  23. <li class="project">
  24. {% include 'partials/projet-block.html.twig' with {'page':post,'display':'text'} %}
  25. </li>
  26. {% endfor %}
  27. </ul>
  28. </section>
  29. {% endif %}
  30. {% endfor %}
  31. </div>
  32. {% endblock %}