- Expanding all layers of the menu tree past the second layer.
- Limiting the maximum number of list items contained within the main navigation (overflow items are placed into a secondary navigation level).
- Method for handling the responsive layout of the menu.
The navigation widget source is present in lib/web/mage/menu.js along with the menu widget source.
Initialize the navigation widget
For information about how to initialize a widget in a JS component or
The navigation widget has the following options:
Width of user’s window in px for which the menu switches between mobile view and desktop view.
Container’s CSS selector to track the menu overflow on responsive navigation.
The number of top level navigational items in main menu.
Set the text for the overflow menu (i.e. more)
The default responsive handler for the navigation widget.
Moves the list items that are more than the total max item number set by the user option.
Builds the more overflowing menu by cloning the main menu items.