{% extends 'KnpMenuBundle::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 %} {%- if options.bare is defined and options.bare %} {%- set options = options|merge({'bare': false, 'root': false}) %} {{ block('children') }} {%- else %} {# Add Semantic UI classes to the list element #} {%- set classes = listAttributes['class'] is defined ? [listAttributes['class']] : [] %} {%- set classes = classes|merge(['menu']) %} {%- if options.root is not defined or options.root %} {%- set classes = ['ui']|merge(classes) %} {%- set options = options|merge({'root': false}) %} {%- endif %} {%- set listAttributes = listAttributes|merge({'class': classes|join(' ')}) %}