Modules::SimpleMenu - generic menu-builder for ExSite

SimpleMenu is a multi-purpose menu-builder for ExSite websites. It will create context-specific menus on any web page in a site. Context-specific means that the site navigation links will reflect the current location in the site.

SimpleMenu can also serve as a code template for a customized menu builder, since it contains a general purpose menu-construnction algorithm based on the ExSite page placement parameters.

SimpleMenu can build four types of menus:

vertical
navigation links are stacked in a vertical list, with submenus exploded within this list. This is the default menu type.

horizontal
navigation links are listed left-to-right, with each link separated by a ``|'' (bar) character. Only the top-level links in the site are shown, and no submenus are displayed.

path
the path from the site home page to the current page is displayed in the ``cookie crumb'' format, ie. page1 > page2 > page3

sitemap
the full site structure is shown, with child pages indented beneath their parents.

When inserting a web application tag into a block of HTML, any of the above types may be provided as a parameter.

When manually coding a SimpleMenu dynamic content tag, the format is:

<!--&SimpleMenu(format)-->

where ``format'' is one of the above menu types.

Sub-menus

SimpleMenu builds global menus for the whole website by default. That is, the ``top'' level pages displayed in the menu are those that have no parent page defined. Sub-menus show pages that have a common parent page.

SimpleMenu automatically inserts sub-menus into vertically-formatted menus if the viewer is viewing a top-level parent page that has child pages, or is viewing any of those child pages. It does descend any further into the menu hierarchy than this.

SimpleMenu will build a horizontal sub-menu if the ``submenu'' parameter is included in the dynamic content tag, eg.

<!--&SimpleMenu(horizontal,submenu)-->

In this case, the sub-menu shows the pages that are children of the currently-viewed page. It can show sub-menus to any depth.

Customizing Menu Appearance

CSS

The following CSS classes are used, and may be customized in any given site's stylesheets:

a.menu
All main menu links in vertically and horizontally-formatted menus are of the ``menu'' class.

a.submenu
All submenu links in vertically-formatted menus are of the ``submenu'' class.

Menu Templates

Vertically-formatted menus will attempt to inline special content objects to spice up the menu presentation:

SimpleMenuTop
This content will be placed before all menu links.

SimpleMenuMid
This content will be placed between all menu links.

SimpleMenuBot
This content will be placed after all menu links.

Using these content objects, a template can incorporate custom table layouts, border graphics, and other visual tricks to lay out the menu.

Menu Spacer Strings

In addition to the above method of customizing the menu HTML, there are also some spacer strings that are automatically inserted at certain points in the menu to delineate the different links. These are defined in the SimpleMenu configuration file, which should be located in cgi/conf/SimpleMenu.conf:

hmenu_spacer
inserted between menu links in a horizontal menu. Default: &nbsp;|&nbsp;

pmenu_spacer
inserted between menu links in a path menu. Default: &nbsp;&gt;&nbsp;

vmenu_spacer
inserted between menu links in a vertical menu. Default: <br> Note that if you use display:block in your CSS for menu links, the vmenu_spacer should be left blank to prevent extra blank lines from being added to your menu layout.

submenu_prefix
inserted in front of submenu links. Default: &nbsp;&nbsp;&nbsp;&middot;&nbsp;