Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 845
doron Avatar asked Jun 09 '14 12:06

doron


Video Answer


1 Answers

You can pass it like that:

{{ knp_menu_render('AcmeDemoBundle:Builder:mainMenu', {'currentClass': 'active'}) }}
like image 151
Bartek Avatar answered Nov 07 '22 13:11

Bartek