default.html.twig 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. {% extends 'partials/base.html.twig' %}
  2. {% macro loop(page) %}
  3. {% for p in page.children.visible %}
  4. {% set current_page = (p.active or p.activeChild) ? 'selected' : '' %}
  5. <div class="has-children {{ current_page|e }}">
  6. {# parent #}
  7. <h2>{{ p.menu|e}}</h2>
  8. {{ p.content|raw }}
  9. {% if p.children.visible.count >= 0 %}
  10. <div>
  11. {% for ppage in p.children.visible %}
  12. <h3>{{ ppage.menu|e }}</h3>
  13. {{ ppage.content|raw }}
  14. {% if p.children.visible.count >= 0 %}
  15. <div>
  16. {% for pppage in ppage.children.visible %}
  17. <h4>{{ pppage.menu|e }}</h4>
  18. {{ pppage.content|raw }}
  19. {% endfor %}
  20. </div>
  21. {% endif %}
  22. {% endfor %}
  23. </div>
  24. {% endif %}
  25. </div>
  26. {% endfor %}
  27. {% endmacro %}
  28. {% block content %}
  29. {{ _self.loop(pages) }}
  30. {% endblock %}