Creating a placeholder tag | HCL Digital Experience

You use a placeholder tag to display metadata within an element or component design.

About this task

This is the format of a placeholder tag:

[placeholder tag=" " htmlencode=" " start=" " end=" " ]

To create a placeholder tag:

Procedure

  1. Click Insert a Tag from a presentation template or element design field. The Tag Helper dialog opens.
  2. Select Placeholder as the tag type.
  3. Select a placeholder tag type. This is added to the placeholder tag as the tag=" " parameter:
    Name
    This is used to display the name of the site area or content item that is retrieved in a menu or navigator. This parameter can also be used when you create a user name component, where you can add a placeholder tag in the design and specify tag="name" to render the name of the user.
    Title
    This is used to display the title of the site area or content item that is retrieved in a menu or navigator.
    dn
    This is for when you create a user name component. You can add a placeholder tag in the design and specify tag="dn" to render the distinguished name of the user.
    HREF
    This inserts a link to the page of the site area or content item that is retrieved in a menu or navigator.
    noprefixhref
    The URLs generated by "HREF" parameter is fully qualified when viewed through a portal. To generate URLs with no prefix, use the "noprefixhref" parameter instead of the "HREF" parameter.
    NameLink
    This is a combination of the name and HREF tags. It assembles a complete link based on the name of the item that is returned.
    noprefixnameLink
    The URLs generated by "nameLink" parameter is fully qualified when viewed through a portal. To generate URLs with no prefix, use the "noprefixnameLink" parameter instead of the "nameLink" parameter.
    TitleLink
    This is a combination of the title and HREF tags. It assembles a complete link based on the title of the item that is returned.
    noprefixtitleLink
    The URLs generated by "titleLink" parameter is fully qualified when viewed through a portal. To generate URLs with no prefix, use the "noprefixtitleLink" parameter instead of the "titleLink" parameter.
    sitepath
    This is similar to the HREF placeholder except that it only displays only the site path of an item's URL.

    For example, an HREF placeholder tag that displays a content item might give you:

    • /ILWWCM/connect/metaorg/intranet/press+releases

    Whereas the site path gives you:

    • /metaorg/intranet/press+releases

    For example, an HREF placeholder tag that displays a site area might give you:

    • /ILWWCM/connect/metaorg/intranet/

    Whereas the site path gives you:

    • /metaorg/intranet
    Note that the final / slash is not included when the site path is displayed for site areas.
    Idnum
    This returns the hexadecimal ID value of an item. This parameter can be used to create static URLs in menus and navigators. You can hardcode the site area path in a menu or navigator element design and use the Idnum for each content item displayed. This method is used to display content with a different presentation template (for example, a printer-ready presentation template) or use different security settings.
    Listnum
    The index of the item in the list.
    Treenum
    Displays a hierarchical numbered list:

    1.0
    1.1
    1.2
    2.0
    2.1
    2.2

    Paddedtreenum
    Similar to Treenum, but the numbers are padded:

    0001
    00010001
    00010002
    000100020001
    000100020002

    Depth
    Displays the depth of the currently processed node (in a navigator or menu) as a number. A top-level node has a depth of 1.
  4. If you are using the placeholder tag with an authoring tools element that is rendered by the JSR 286 web content viewer, specify the format attribute to control where the authoring task is performed.
    format="tag"
    The placeholder is rendered as a URL that opens the authoring portlet in a new window. This behavior is used by default if no value is specified.
    format="url"
    The placeholder is rendered as a URL that redirects the user to a hidden portal page that is used by the JSR 286 web content viewer for inline editing.
  5. Select the type of encoding for the placeholder:
    Encode tag output
    If selected, the reserved HTML characters in the source are converted into character entities. For example, '<' is converted to '&lt;'. 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 look and feel of their text with HTML.
    Do not encode tag output
    If selected, no encoding is applied to the HTML rendered by the placeholder tag.
    Default encoding
    If selected the default setting specified by the cmpnt.htmlEncodeDefault property in the WCM WCMConfigService service is used. By default, this property is set to true.
  6. Click OK to add the tag to your navigator design.

What to do next

Once you add the tag to your design, you can also add the following parameters to the tag:
Table 1. Additional tag parameters
Tag parameters Details
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.
Using a URLCmpnt tag:

The URLCmpnt tag is used to generate a URL to a site area or content item and can be used as an alternative to a placeholder when a URL is generated. This method is useful when you create links to web content displayed within rendering portlets.