{% extends 'knp_menu.html.twig' %} {% block list %} {% if item.hasChildren and options.depth is not same as(0) and item.displayChildren %} {% import 'knp_menu.html.twig' as knp_menu %} {% set options = options|merge({'rootClass': '' }) %} {{ block('children') }} {% endif %} {% endblock %} {% block linkElement %}{% import _self as knp_menu %}{{ block('label') }}{% endblock %} {% block item %} {% set classes = item.attribute('class') is not empty ? [item.attribute('class')] : [] %} {% do item.setAttribute('class', classes|merge(['menu-text'])|join(' ')) %} {{ parent() }} {% endblock %}