Product menus, info menus and top menus are displayed and styled using the ShopMenu control. Using this control, it is possible to show the entire menu tree or only a smaller segment (e.g. only top-level menus in a tree).
The “depth” attribute controls, which part of the menu tree to display. It has three possible values: “1”, “2” or “All”. How these possible values behave, depend on whether or not the MenuID attribute is also specified on the control.
Specifying "All":
- If no MenuID is specified, it renders all levels, including top level.
- If MenuID is specified, it renders only decendants of the menu with the specified MenuID (not the menu itself).
Specifying "1":
- If no MenuID is specified, it renders top level only.
- If MenuID is specified, it renders immediate children of the specified MenuID (not the menu itself).
Specifying "2":
- If no MenuID is specified, it renders top level as well as immediate children.
- If MenuID is specified, it renders immediate children and immediate childrens children of the specified MenuID (not the menu itself).
Note that the behavior is the same regardless of the menu type (e.g. product menu/info menu).
Consider the example below – a menu tree consists of a top-level menu “Menu A” and its children and childrens children.
The table illustrates which of the menus in the tree are shown, if MenuID refers to menu “A-1” (first table) and if MenuID is not specified (second table).