We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello
I just want to know how can I use the KnpMenu with 'dynamic' link ? When I do this (I work with Symfony2) :
public function mainMenu(FactoryInterface $factory, array $options) { $menu = $factory->createItem('root'); $menu->addChild('Menu 1', array('route' => '_route_1')); $menu->addChild('Menu 2', array('route' => '_route_2')); $menu['Menu 1']->addChild('Submenu 1', array( 'route' => '_route_submenu_1', 'routeParameters' => array('slug' => 'fake_slug_param'))); $menu['Menu 1']['Submenu 1']->addChild('Another submenu', array( 'route' => '_another_route', 'routeParameters' => array('slug' => 'another_fake_param'))); return $menu; }
And after render it :
{{ knp_menu_render('MAHomeBundle:Builder:mainMenu') }}
How can I just display the first level and keep the 'current' status propagation of the children ?
If I do that :
{{ knp_menu_render('MAHomeBundle:Builder:mainMenu', {'depth': 1}) }}
Only "Menu 1" and "Menu 2" will be display BUT if I am on the page with route "_another_route", "Menu 1" will not have 'current_ancestor' class ...
Is there a solution?
Ps : sorry for my bad english ...
The text was updated successfully, but these errors were encountered:
@Cryde : this seems covered under the discussion in #26: if that's the case can you close this issue?
Sorry, something went wrong.
oh.. also #96
@stof: can you close the issue ?
No branches or pull requests
Hello
I just want to know how can I use the KnpMenu with 'dynamic' link ?
When I do this (I work with Symfony2) :
And after render it :
How can I just display the first level and keep the 'current' status propagation of the children ?
If I do that :
Only "Menu 1" and "Menu 2" will be display BUT if I am on the page with route "_another_route", "Menu 1" will not have 'current_ancestor' class ...
Is there a solution?
Ps : sorry for my bad english ...
The text was updated successfully, but these errors were encountered: