Now my menu is made like this.

<ul class="nav navbar-nav"> <li><a href="{{ path('nvbs_accident_homepage') }}">Серьезные аварии</a></li> <li><a href="{{ path('conversion_homepage') }}">Конвертация</a></li> <li><a href="{{ path('arfs_homepage') }}">aRFS</a></li> </ul> 

I now want to use KnpMenuBundle to build the menu. The menu is displayed, but that's just not clear how to make your template.

    1 answer 1

    You can create your own template, and then bind it to the menu, as shown below:

     {{ knp_menu_render('название меню', {'template': 'AcmeBundle:Menu:knp_menu.html.twig'}) }} 
    • Which way should this template be placed? writing {{knp_menu_render ('AppBundle: MenuBuilder: mainMenu', {'currentClass': 'active', 'template': 'AppBundle: Menu: knp_menu.html.twig'})}} I place the template in app / Resource / views / Menu / knp_menu.html.twig When the page loads, I get Unable to find template "AppBundle: Menu: knp_menu.html.twig" - thecoder