Menu Builder 202. Menu Item

Menu Builder Index

A Menu Item

A menu item is encapsulated by an <li> element.This class attribute of this element holds the class information relevant to this menu item.
The <li> contains either an <a> element if this menu item has a URL or a <p> element if the menu item is pure text.

In both scenarios the <a> or the <p> contains at least a:

  • <span class="nscMenuItemLabel">MENU_ITEM_LABEL</span>;
  • if the user has specified a sub label, a further <span class="nscMenuItemSubLabel">MENU_ITEM_SUBTEXT</span> will be present.

Example Menu Item Containing a Link and a sub label:

  • <li class="nscMenuItemLevel-1 nscMenuItemID-department_1 CUSTOMCLASS">
  • <a href="http://YOUR_DOMAIN/store/department/1/Alcohol/">
    • <span class="nscMenuItemLabel">label for alcohol</span>
    • <span class="nscMenuItemSubtext">sub label for alcohol</span>
  • </a>
  • </li>

In this example CUSTOMCLASS was entered by the user in the WSM interface in the Menu Options tab.

The class attribute: nscMenuItemID-department_1 is generated by the platform and is added to the menu markup through the {menulevel#[‘sItemClass’} nitroscript tag.

The class attributes: nscMenuItemLevel-1, nscMenuItemLabel and nscMenuItemSubtext are added by the template and can be removed/ changed there. They are necessary for the default layouts so don’t remove them casually!

next: Menu Builder 203. Default CSS Classes