-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
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
Get children of active Menu Item #156
Comments
I'm trying to do this too ... anyone ? |
I did something like this for my tree menu. I wanted to render my tree from sub menu items of the current active top menu item. {% set menu = knp_menu_get('menu') %}
{% set topmenuitem = admin_menu_top(menu, 1) %}
{% if topmenuitem %}
{{ knp_menu_render([menu, topmenuitem.name], { 'template': 'KunstmaanAdminBundle:Menu:knp_menu_treemenu.html.twig'}, 'bootstrap') }}
{% endif %} To get the current topmenu item using 'admin_menu_top', I made the following TwigExtenstion : https://github.com/Kunstmaan/KunstmaanAdminBundle/blob/knpmenu/Twig/MenuTwigExtension.php Hope this'll help you a bit. |
Hello, the Voter feature is not enough fo you ? Why ? |
Hi, Is there any way to do this? |
Is there a way to get the children from the active item automatic?
If not, i'd like to suggest this for the future:)
It would be nice to be able to create submenus (2 line navigation) like here: http://www.xendach.de/
If you check the navigation, you see that there are 4 parent items and when you hover the parent, you see the children AND you also see the current items childs under the main main
e.g. something like this pseudocode would be nice:)
The text was updated successfully, but these errors were encountered: