sidemenu
Use the <sidemenu> tag to add a side menu.
Available attributes:
Attribute | Type | Mandatory | Description |
---|---|---|---|
parentsDepth | Integer | Y | Specify the depth of the parent category. |
childrenDepth | Integer | Y | Specify the depth of the child categories. |
includeCategories | Integer | N | Set the value to 1 to add categories to the side menu. The default value is 0. |
includeItems | Integer | N | Set the value to 1 to add items to the side menu. The default value is 0. |
isFixed | Boolean | N | Set the value to true to fix the menu, so that it remains visible when the page is scrolled. The default value is false. |
title | String | N | Specify the menu title. |
offsetTop | Integer | N | Set the value for the offset at the top of the menu in pixels. The default value is 24. |
offsetBottom | Integer | N | Set the value for the offset at the bottom of the menu in pixels. The default value is 24. |
isMobilePopup | Boolean | N | Set the value to true to display the menu as a mobile pop-up window. The mobile pop-up menu covers the page and it can be closed. Otherwise, the menu is a part of the page and cannot be closed. The default value is false. |
isPopupOpened | Boolean | N | Set the value to true to open the mobile pop-up menu. The default value is false. |
doClose | Function | N | Specify an additional action when the mobile pop-up menu closes. Set the attribute value to the custom s_widget_custom method created in the client script. |
Example:
sidemenu
<SideMenu
title={data.title}
isFixed={true}
offsetTop="24"
offsetBottom="24"
isMobilePopup={data.sizeMobile}
isPopupOpened={data.isOpened}
doClose={s_widget_custom.kebabSideMenuClosed()}
parentsDepth="0"
childrenDepth="5"
includeCategories="1"
includeItems="1">\
</SideMenu>
The template above adds the following element to the page: