
78
Serena® Collage® 5.1.3
Chapter 3 Design-Time Component Reference
complete the
body
section with a combination of standard HTML, and any combination
of the data field macros, including:
For detailed information on these and other data field macros that you can use with
the Include Asset component, see "Data Field Macro Reference" on page 23.
Displaying Text on Images
When an image is used inside the Include Asset body, the component can flatten text onto
the image. You can do this by adding a special
text
parameter to the
<img>
tag, as in the
example below:
<a href="$node.url"> <img src="button.gif"
text="$node.metadata('buttonname')"> </a>
This example flattens the value of a metadata field called
buttonname
on the image. You
can use this attribute in conjunction with any data field macros, or any other text value.
Include Asset Properties
Field Description
$node.assetid
Inserts the asset's ID number
$node.contribution("
field_name
")
Inserts content from a specified
contribution field
$node.CreateDate
Inserts the date that the asset was
created
$node.Description
Inserts the asset's description
$node.FileName
Inserts the actual name of the file
$node.meta('
metadata name
')
Inserts the value of the specified
metadata field
$node.MimeType
Inserts the asset's MIME-type
$node.name
Inserts the asset name
$node.Size
Inserts the asset's filesize
$node.url
Generates a link to the asset
NOTE
The
$node.url
macro
generates a relative URL. You can also
generate an absolute URL to the asset
by instead using the
$node.absurl
.
Property Value Description
classid
Always set to
"nexus/
components/IncludeAsset"
Code must point to the component class file inside the JAR file
that is needed to implement the component. This property is
required.
code
Always set to the path in
Collage to the
nexusComponents.jar file, such
as
"/System/Components/
nexusComponents.jar"
The archive where the component class file is stored. By
default, this is stored in:
/
root
/System/Components/
nexusComponents.jar
. You can also set this property to:
code="$nexusComponents"
which will resolve to the correct
path.
Commenti su questo manuale