DropMenu Examples
The following examples cover usage of the default Navigation/Site Map snippet. It is highly customizable and can build virtually any type of CSS-stylable menu system. Drop Menu can be called multiple times on a page.
Examples
The styling you see for the main navigation in the sidebar on this default template is a simple indented list. It supports many things "out of the box", including:
- No links built for pages without content by default. These are great for creating "category" navigation headers.
- Unpublished pages and pages with Show In Menu unchecked do not show up by default in your menus (but this can be overridden).
- Pages that you are currently on recieve a class of "here" by default and are no longer built as links.
- A class of "here" is also added to each LI element back up the "document heirarchy" by default.
- Very simple CSS styling.
[!DropMenu!]
#sidebar ul {
padding: 5px 20px 1em;
margin: 0 0 1em -5px;
}
#sidebar ul ul { margin-bottom: 0; border-bottom: 1px solid #ddd; }
#sidebar ul ul ul { border-bottom: none; margin-bottom: 0; }
#sidebar ul li ul li { background: url(images/tictac_green.gif) no-repeat 0 6px; }
The call for the sitemap found on the 404 page is only slighly different. It adds one parameter in order to show the description along with the page names/links:
[!DropMenu? &showDescription=`1`!]