Menu Builder 201 Menu Structure

Menu Builder Index

Menu Structure

The Menu Template

Your menus are generated from a template like all other store components. It can be found in the WSM under Design & Content → Edit Templates.

It is very important to note that all your menus use the same template!

The Nested Levels

A menu can have up to 5 nested levels. The template loops through the top level menu items.

For each menu item the template prints an <li> element. It then immediately loops through the next level looking for menu items that are children of the printed item.

It it finds children, the template prints out a <ul> element, inserts the child menu item and repeats the process on the next level down.

This continues until it has recursively printed out all menuItem over all five levels.

Available info

Menu items are stored in 5 arrays called menulevel# where # is one, two, three, four or five.

You can check for the existence of content in an array by using {ifThereAre menulevel#}.

Each menulevel array can be iterated over using {foreach menulevel#}.

Each item in a menulevel# array is a menu item. Each menu item is itself an array of data containing the following:

  • nItemID:
  • a unique ID for this menu item (if you change your menu structure this ID will change);
  • nItemParentID:
  • the ID of this parent menu item. Top level menu items have 0 in this slot;
  • sItemURL:
  • the link URL for this menu item. This link will reflect any SEO urls you have set up in your store;
  • sItemLabel:
  • the display label for this menu item. Departments, categories and subcategories use the value you have entered into your POS but in the case of static links you can override this with a label;
  • sItemClass:
    • This is explained in detail here;
  • sSubText:
  • You can create sub labels for static links through the menu builder interface - see this link;

Next: Menu Builder 202. Menu Item