
56
Serena® Collage® 5.1.3
Chapter 3 Design-Time Component Reference
Manually
The syntax varies depending on whether you want to insert an image banner or a text
banner. The component body (everything between the opening and closing tags) defines
the text and/or image that will comprise the banner. The text or image that will be used in
the banner is identified in an embedded
<node:active>
tag.
Image Banner
The example below illustrates the syntax for an image banner:
To burn your own text onto the image, simply insert the text in place of
$node.name
in
the
text
attribute. To prevent any text from appearing on the image, delete the
text
attribute.
Text Banner
If you choose to use a text banner, simply insert the text inside the
<node:active>
tag,
as in the example below:
You can apply any HTML formatting that you want to this text, as well. For example, to
make the text bold, enclose it with a
<strong>
tag:
<node:active>
<h2>Banner text</h2>
</node:active>
<nexus:component classid="nexus/components/Navbar"
code="$nexusComponents" nodes="current">
<node:active>
<img src="../images/Objects.gif" border=0 text="$node.name"
width="100" height="100">
</node:active>
</nexus:component>
<node:active>
tag
encloses the banner
body, which identifies
the image and text
text attribute in the image link defines the
text that will be flattened onto the image,
which in this case is the $node.name field,
which displays the name of the asset which
contains the component
Banner will use "Objects.gif" image
<nexus:component classid="nexus/components/Navbar"
code="$nexusComponents"
nodes="current" type="text">
<node:active>Banner text</node:active>
</nexus:component>
<node:active>
tag encloses
the banner body, which
contains the banner text
Commenti su questo manuale