This macro will build a navigational menu using unordered lists sutiable for standard top or left-hand navigation. These lists can then be formated by css. The resulting code will look like (where the 2nd <li> is the active link).
Examples:
Example 1: A simple example using the required fields
#navigation(2,2)
This would build a navigation bar 2 levels deep, which would open as the user clicked into a subsection.
Example 2: An example showing how to include one or more of the optional parameters
#set($openAllLevels=true)
#navigation(2,2)
This would build a navigation bar 2 levels deep, which would open as the user clicked into a subsection.
Example 3: An example showing how to include one or more of the optional parameters
<div id="leftNav">
#set($menuSpans = true)
#navigation(2,2)
</div>
This would build a navigation bar 2 levels deep, which would open as the user clicked into a subsection. It will also add span tags around all links.
Example 4: An example showing how to include one or more of the optional parameters
<div id="leftNav">
#set($openAllLevels=true)
#navigation(2,2)
</div>
This would build a navigation bar 2 levels deep, which would open as the user clicked into a subsection.
Example 5: An example showing how to include one or more of the optional parameters
<div id="leftNav">
#set ($navigationSourceCode = '/my_velocity_files/my_navigation.vtl')
#navigation(2,2)
</div>
This would build a navigation with your own source code.
Post a Comment