navigation.html.twig 762 B

12345678910111213141516171819202122232425262728
  1. {% macro nav_loop(page) %}
  2. {% for p in page.children.visible %}
  3. {% set active_page = (p.active or p.activeChild) ? 'active' : '' %}
  4. {% if p.children.visible.count > 0 %}
  5. <li>
  6. <a href="{{ p.url }}" class="{{ active_page }}">
  7. {{ p.menu }}
  8. </a>
  9. <div class="cat">
  10. <img src="/user/themes/hehe/images/fleche2.svg" alt="">
  11. </div>
  12. </li>
  13. {% else %}
  14. <li>
  15. <a href="{{ p.url }}" class="{{ active_page }}">
  16. {{ p.menu }}
  17. </a>
  18. </li>
  19. {% endif %}
  20. {% endfor %}
  21. {% endmacro %}
  22. <ul {{ tree ? 'class="tree"' : '' }}>
  23. {{ _self.nav_loop(pages) }}
  24. </ul>