<ul data-level="{{ menu_level|default(1) }}">
    {% for item in items %}
        {% if item.isAllowedToDisplay(app.request, app.security) %}
            <li class="{{ item.isActive(request) ? 'active' : '' }}">
                <a href="{{ item.link }}">
                    {% if item.iconClass is not empty %}
                        <i class="{{ item.iconClass }}"></i>
                    {% endif %}
                    <span>{{ item.title }}</span>
                </a>
                {% if item.children|length > 0 %}
                    <div class="menu-sub">
                        {% include 'VisualMManagementBundle:Menu:list.html.twig' with { items : item.children, menu_level : menu_level|default(1) + 1 } %}
                    </div>
                {% endif %}
            </li>
        {% endif %}
    {% endfor %}
</ul>
