Use Placeholders in element designs

 

+

Search Tips   |   Advanced Search

 

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

<placeholder tag=" " htmlencode=" " start=" " end=" " />

<placeholder Opens a Placeholder Tag.
tag=" " Determines which placeholder is being referenced:

  • Name
  • Title
  • dn
  • Href
  • noprefixhref
  • Namelink
  • noprefixnamelink
  • Titlelink
  • noprefixtitlelink
  • Sitepath
  • Idnum
  • Listnum
  • Treenum
  • Paddedtreenum
  • Depth

htmlencode=" " If htmlencode="true" the reserved HTML characters in the source will be converted into character entities. For example, '<' will be converted to '&lt;'. This is useful if you would like to prevent users adding malicious code, or if you want to prevent users changing the look and feel of their text using HTML. If not specified, the default setting specified in the WCM ConfigService.properties file is used. By default, this is set to "true":

cmpnt.htmlEncodeDefault=true
start=" "

end=" "

The start and end attributes are used to wrap the data returned by a tag within other tags, such as HTML. These attributes are not mandatory.
/> This closes the tag.

 

Placeholder types

Name Used to display the name of the site area or content being retrieved in a menu or navigator. This 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 Used to display the title of the site area or content being 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 being retrieved in a menu or navigator.
noprefixhref The URLs generated by "HREF" parameter will be 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 being returned.
noprefixnameLink The URLs generated by "nameLink" parameter will be 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 being returned.
noprefixtitleLink The URLs generated by "titleLink" parameter will be fully qualified when viewed through a portal. To generate URLs with no prefix, use the "noprefixtitleLink" parameter instead of the "titleLink" parameter.

Use a URLCmpnt tag.

The URLCmpnt tag is used to generate a URL to a site, site area or content item and can be used as an alternative to a placeholder when generating a URL. This is particularly useful when creating links to Web content displayed within rendering portlets.

sitepath This is similar to the HREF placeholder except that it only display the site path of an items URL.

For example, an HREF placeholder tag displaying a content item may give you:

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

Whereas the site path will give you:

  • /metaorg/intranet/press+releases

For example, an HREF placeholder tag displaying a site area may give you:

  • /ILWWCM /connect/metaorg/intranet/

Whereas the site path will give you:

  • /metaorg/intranet

Note that the final / slash is not included when the site path is displayed for sites and site areas.

Idnum This returns the hexadecimal id value of an item. This can be used when creating static URLs in menus and navigators. You could hard-code the site/site area path in a menu or navigator element design and use the Idnum for each content item being displayed. This would allow you to display content with a different presentation template

For example...

a printer friendly presentation template) or use different security settings.

Listnum Displays a single column list of numbered links:

  1. First
  2. Second
  3. Third

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.

 

Parent topic

Work with element designs

 

Related concepts


Use start and end attributes

 

Related reference


Generating a URL to a site, site area or content item