Creating an element tag
The Element tag is used to reference an element within a presentation template or element design.
About this task
The format of an element tag:
[Element type=" " context=" " name=" " key=" " format=" " pre=" " link=" " separator=" " htmlencode=" " awareness=" " ifEmpty=" " start=" " end=" " ]
To create an element tag:
Procedure
What to do next
Tag parameters | Details |
---|---|
name=" " | If you specify name="./itemName", the actual path is not resolved until the item is rendered. This method takes slightly longer to resolve than specifying the path to the item. |
format=" " | This parameter is optional and can be used only
with some element types:
|
pre=" " | Set pre="true" to enable multi-line support. This setting is only applicable to the text and short text elements. If enabled, line breaks entered by the user when they enter text in these elements are recognized when rendered. If not specified, this setting defaults to false. |
link=" " | The link parameter is used to define the type
of link that is created by the element tag:
Contextual linking:
Contextual linking is used so that when content is linked from another site, the link is rendered relative to the current site if possible. It can be used only if context=current or context=autofill. |
separator=" " | This parameter is used when you reference an option selection or user selection element. It is used to define what text or code is rendered between each selection that is displayed in an option selection or user selection element. For example, to add a line break between each selection, you would use separator="<br>". If not defined, a comma is placed between each selection when rendered. |
htmlencode=" " | If htmlencode="true",
then the reserved HTML characters in elements that display text are
converted into character entities. For example, '<'
is converted to '<'. This method
is useful if you would like to prevent users from adding malicious
code, or if you want to prevent users from changing the design of
their text by using HTML. If not specified, the default setting specified by the cmpnt.htmlEncodeDefault property in the WCM WCMConfigService service is used for displaying text. The default setting specified by the cmpnt.htmlEncodeUrls property in the WCM WCMConfigService service is used for displaying URLs. By default, these properties are set to true. |
awareness=" " | If awareness="true" then
user names are displayed by using the people awareness features. These
features display user names as hyperlinks that allow users to contact
people with whom they might want to work. Wherever person links appear,
users can click the link to display a menu of actions for collaborating
(contacting and working) with the person named by the link. If an
administrator has also configured an IBM® Sametime® server to work with WebSphere® Portal, person links indicate
whether a person is active, away, offline, or in a Do Not Disturb
state. If not specified, then awareness="false" and people awareness is not used. |
ifEmpty=" " | Enter some text to display if no result is returned by the tag. If not specified, nothing is displayed if no result is returned by the tag. |
start=" " end=" " |
The start and end attributes are used to wrap the data that is returned by a tag within other tags, such as HTML. These attributes are not mandatory. |