Supporting Hierarchical Menus
Sandvox will generate a hierarchical Site Menu if the following conditions are met:
- The design declares it supports hierarchical menus
- One or more of the pages in the Site Menu is a descendant of another in the menu
If those conditions are not met, the same menu HTML as Sandvox 1 will continue to be generated. The structure of the menus will match the Site Navigator as closely as possible.
To inform Sandvox your design supports hierarchical menus, set the hierMenuType
key in your Info.plist to one of the following:
- Horizontal layout
- Vertical layout, generally appears at the top of the sidebar
- Horizontal when the sidebar is hidden; vertical when it's not
Or, specify -1 if your design includes the javascript/css for hierarchical menus itself; this will prevent the DDSmoothMenu javascript code from being inserted into pages.
Hierarchical menus are implemented using jquery. Sandvox will generate markup to represent the menu structure, and jquery then takes care of making it interactive. We provide some default styling to the menu, but you will almost certainly want to add additional CSS rules to make the menus fit in with your design.
You may want to look at the generated HTML source to see how the classes and IDs work, so that your CSS can take advantage of them.