-
Notifications
You must be signed in to change notification settings - Fork 106
Changing desktop submenu to 3‐level variant
Ola Frankowska edited this page Jan 19, 2024
·
2 revisions
By default, the desktop submenu is a popup that displays all submenu levels in one view:
There is an alternative version "3-level":
- Level 1 opens the submenu popup.
- Level 2 is in the popup on the left.
- Level 3 is displayed in the popup on the right, based on the active level 2 node.
To see an example you can:
- Check "Men" submenu on https://menu-hyva.snowdog.dev/.
- Import menu located in
imports/hyva-topmenu-desktop.yaml
and check "Training" submenu (import instructions).
To use a 3-level submenu, you need to change "Submenu template" to "3-Level" in menu node settings in admin for all nodes that are a part of such submenu:
If you want to have a 3-level submenu as default in your project, copy the content of view/frontend/templates/hyva-topmenu-desktop/menu/custom/sub_menu/3-level.phtml
to <your-theme-path>/Snowdog_Menu/templates/hyva-topmenu-desktop/menu/sub_menu.phtml
. This way you won't need to change "Submenu template" settings in admin.