Search code examples
phpsymfonyknpmenubundle

How to change the "current" class to "active" in KNPMenuBundle


I was wondering, what is the best way to change the "current" class to be "active" so Bootstrap will work correctly with it?

I thought about copying and overriding the knp_menu_html.twig but i think its not the best way...

Anyway better doing it?


Solution

  • You can pass it like that:

    {{ knp_menu_render('AcmeDemoBundle:Builder:mainMenu', {'currentClass': 'active'}) }}