
82
Serena® Collage® 5.1.3
Chapter 3 Design-Time Component Reference
3
Select the
Serena Collage Design Components
palette.
4
Click the
Insert MetaTag
button .
5
Manually complete the MetaTag component. See "The MetaTag Body" on page 82 for
more information.
Manually
Insert the following code in the
<head>
section of a web page:
The body of the tag, included in the
<meta name>
tags, identifies the specific metadata
fields to be included. See the next section.
The MetaTag Body
If no body is provided, all available metadata will be inserted.
For each metadata field you want to insert, include the following line in the body of the
component:
<meta name="
name
" content="$node.meta('
parameter
')">
The
name
attribute will insert a name for the metadata value. The
content
attribute will
insert the specific metadata value for the asset that contains the component.
For example, if you include the following line:
<meta NAME="Author" content="$node.meta('author_name')">
For an asset with a metadata field called
author_name
which has a value of "Ray," the
component will insert the following when the asset is deployed:
<meta NAME="Author" content="Ray">
You can also optionally include a second
$node.meta
parameter to define date
formatting, if you are retrieving a date type metadata field. For example:
$node.meta('Review Date', yyyy.MM.dd)
MetaTag Properties
<nexus:component classid="nexus/components/MetaTag" code="
path
to nexuscomponents.jar file
">
<meta name="
name
" content="$node.meta('
parameter
')">
<meta name="
name
"
content="$node.meta('
parameter1
','
parameter2
')">
</nexus:component>
<meta>
tags identify
the metadata fields
for which the values
will be retrieved
name attribute assigns a name to the metadata field
$node.meta parameters identify the
metadata fields
Property Value Description
classid
Always set to:
"nexus/components/
MetaTag"
Code must point to the component class file inside
the JAR file that is needed to implement the
component. This property is required.
Kommentare zu diesen Handbüchern