I'm curious, is there a way to render a partial menu containing siblings (and maybe children) of the current menu item?
Given a menu tree:
Items
--> Bat
--> Ball
------> Large Ball
------> Medium Ball
------> Small Ball
--> Bottle
If the user is on the Large Ball page, I'd like to be able to render all siblings. In my real case, they would be rendered as tabs.
#84 may be the same thing, but it seems like that use case is actually rendering all the ancestors as well.
It seems I can do this:
{{ knp_menu_render(['AcmeDemoBundle:Builder:mainMenu', 'Items', 'Ball']) }}
But that would require that I know the name of the current menu item. If I can get that in twig somehow, I guess that would be fine and I could just fill it in there, but ideally there'd be some baked in functionality to support rendering sub-trees.
I'm curious, is there a way to render a partial menu containing siblings (and maybe children) of the current menu item?
Given a menu tree:
If the user is on the
Large Ballpage, I'd like to be able to render all siblings. In my real case, they would be rendered as tabs.#84 may be the same thing, but it seems like that use case is actually rendering all the ancestors as well.
It seems I can do this:
But that would require that I know the name of the current menu item. If I can get that in twig somehow, I guess that would be fine and I could just fill it in there, but ideally there'd be some baked in functionality to support rendering sub-trees.