Skip to content

Get children of active Menu Item #156

Open
@DanielFatkic

Description

@DanielFatkic

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:)

<div class="navbar-inner">
   {{ knp_menu_render('RFWCoreBundle:Builder:mainMenu', {'currentClass': 'active', 'template': 'RFWCoreBundle:Menu:knp_menu.html.twig'}) }}
</div>

<div class="submenu">
{% set active = knp%}
{% set menuItem2 = knp_menu_get('RFWCoreBundle:Builder:mainMenu', {from: 'current', 'currentClass': 'active','template': 'RFWCoreBundle:Menu:submenu.html.twig'}) %}

        {{ knp_menu_render(menuItem2) }}
</div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions