
94
Serena® Collage® 5.1.3
Chapter 3 Design-Time Component Reference
Site Structure Based Navigation Bar
In this example, the Navigation Bar component will be added to Home.html, from the
simple section of a site structure pictured below.
The following component code is added to Home.Html:
Once Home.html is checked in and previewed or deployed, the Navigation Bar may look
something like this:
Deploy Folder Based Navigation Bar
The following example creates links to all assets in the asset's current deploy folder, as
well as all assets in the parent deploy folder. To limit the number of links to only those
assets which are index files in their directories, the component includes the optional
<nexus:component classid="nexus/components/Navbar"
code="$nexusComponents"
nodes="Current Children">
<node:active>
<a href="$node.url">
<img src="active_button.gif" text="$node.name" border="0">
</a>
</node:active>
<node:inactive>
<a href="$node.url">
<img src="inactive_button.gif" text="$node.name" border="0">
</a>
</node:inactive>
</nexus:component>
Button text will display
the asset name
Inactive page
Active page
Kommentare zu diesen Handbüchern