28 lines
805 B
Twig
28 lines
805 B
Twig
{% extends 'partials/base.html.twig' %}
|
|
|
|
{% macro loop(page) %}
|
|
{% for p in page.children.visible %}
|
|
{% set current_page = (p.active or p.activeChild) ? 'selected' : '' %}
|
|
{% if p.children.visible.count > 0 %}
|
|
<li class="has-children {{ current_page|e }}">
|
|
{# parent #}
|
|
{{ p.menu|e }}
|
|
{{ p.content|raw }}
|
|
<ul>
|
|
{{ _self.loop(p) }}
|
|
</ul>
|
|
</li>
|
|
{% else %}
|
|
<li class="{{ current_page|e }}">
|
|
{# enfant #}
|
|
{{ p.menu|e }}
|
|
{{ p.content|raw }}
|
|
</li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endmacro %}
|
|
|
|
{% block content %}
|
|
{{ _self.loop(pages) }}
|
|
{% endblock %}
|