Closed vihuvac closed 11 years ago
This seems to be the same as #28. Which version of KnpMenu do you currently use? BootstrapBundle should work fine with dev-master.
The matcher variable was introduced in KnpMenu 11 month ago. You need at least this version.
If you have to use an older version of KnpMenu you need to manually adapt the menu.html.twig template of BootstrapBundle.
I am using the last knpMenu dev 1.1.x-dev version based on the last stable **v1.1.*. The point is, in this version hasn't the variable matcher anymore. Though I've installed the last bootstrap-bundle version 1.3.1**, it doesn't work.
The problem is that when 1.1.x was released KnpMenu doesn't support matchers or they matchers were implemented a different way. (Matchers are used to highlight the currently active item in the menu.)
You need to use the latest dev-master
in order to use KnpMenu together with BootstrapBundle. If you have to use an old version of KnpMenu you have to adapt the menu.html.twig template by yourself.
Hum! The matter is I use sonata-admin-bundle too. Sonata ask me for knpMenu v1.1.x-dev. It doesn't allow me to use old version of knpMenu. I don't know, maybe I have to remove the matcher variable from menu.html.twig into the braincrafted-bundle.
Fixed in 1.3.2
I've been working with symfony 2.1 and 2.2. The point is at the beginning I was using knplabs/knp-menu-bundle dev-master as v1.1.0, then bootstrapmenubundle was working fine. The problem began when I ran composer.phar update due to I added a new bundle, composer asked me for the new dev version of knplabs/knp-menu-bundle, then when I check my environment I watched the following error: Variable "matcher" does not exist in /BraincraftedBootstrapBundle/views/Menu/menu.html.twig at line 100.