1234567891011121314151617181920212223242526272829 |
- {% macro nav_loop(page) %}
- {% import _self as macros %}
- {% for p in page.children.visible if p.template != 'default' %}
- {% set active_page = (p.active or p.activeChild) ? 'active' : '' %}
- {% if p.children.visible.count > 0 %}
- <li>
- <a href="{{ p.url }}"{{ active_page }}>
- {{ p.menu }}
- </a>
- <ul>
- {# {{ macros.nav_loop(p) }} #}
- {% for i in p.children.visible %}
- <li>
- <a href="{{ p.url }}"{{ active_page }}>
- {{ i.menu }}
- </a>
- </li>
- {% endfor %}
- </ul>
- </li>
- {% else %}
- <li>
- <a href="{{ p.url }}" class="{{ active_page }} ">
- {{ p.menu }}
- </a>
- </li>
- {% endif %}
- {% endfor %}
- {% endmacro %}
|