{% import _self as menus %}
{#
We call a macro which calls itself to render the full tree.
@see http://twig.sensiolabs.org/doc/tags/macro.html
#}
{{ menus.menu_links(items, attributes, 0) }}
{% macro menu_links(items, attributes, menu_level, textUrl) %}
{% import _self as menus %}
{% if items %}
{% if menu_level == 0 %}
{% else %}
{% endif %}
{% for item in items %}
{%
set classes = [
'menu-item',
item.is_expanded ? 'expanded',
item.is_collapsed ? 'collapsed',
item.in_active_trail ? 'active-trail',
]
%}
{% if item.below %}
{% if menu_level == 0 %}