-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
There are a few things about the way the menu is used in the starter that are a little confusing and could be clarified for anyone seeking to support multiple menus in their project:
- The way that the menu is included:
{% include "menu.twig" with {'items': menu.get_items} %},menu.twigiterates throughmenu.itemsand doesn't use theitemsvariable that is passed when the menu is included. (For all intents and purposes,menu.get_itemsandmenu.itemslook to return identical arrays.) - The way the code is currently working, when the menu instance is created and assigned to
$context['menu']infunctions.php, it's trying to grab a menu called 'primary-menu', which doesn't exist. Right now, this doesn't matter because Timber seems to grab any menu it finds, but it could cause some problems if someone needs to have more than one menu.
Metadata
Metadata
Assignees
Labels
No labels