Creating a Content tag | HCL Digital Experience
The Content tag directly renders a content item or site area.
About this task
The format of an Content
tag:
[Content context=" " presentationPath=" " renderMode=" "]
To create
an Content
tag:
Procedure
- Click Insert a Tag from a presentation template or element design field. The Tag Helper dialog opens.
- Select Content as the tag type.
- Select a context type:
- Autofill
- Use this option when the element that is referenced is determined by the search parameters of a menu, navigator, or taxonomy component. If the tag is not used within a menu, navigator, or taxonomy component, the context reverts to the current item.
- Current
- If selected, the context is set by the current item.
- Portal Context
If selected, the context is set by the context of the current page. This option is only valid for content that is delivered by using a web content viewer portlet.
See the knowledge center topic that is called Web content associations for further information.
- Portal Mapping
If selected, the context is set by the web content association of the current page. This option is only valid for content that is delivered by using a web content viewer portlet.
See the knowledge center topic that is called Web content associations for further information.
- Portlet Context
- If selected, the context is set by context of the current web content viewer portlet. This option is only valid for content that is delivered by using a web content viewer portlet.
- Selected
- If selected, the context is set by the selected item. You select
an item by clicking Select. The selected item
is added to the tag as the
uuid=" "
parameter. If the UUID or path parameter is specified, the context is always "selected", so you do not have to specifycontext="Selected"
.
- Click OK to add the tag to your navigator design.
Optional parameters
Tag parameters | Details |
---|---|
presentationPath=" NamePath" |
You can specify a specific presentation template to be used to render the content item or site area, in place of the default. |
renderMode=" " |
You can specify a render mode to use in place of the default mode. These render modes are predefined: summary, json, xml, html, default. You can use the Web Content Manager API to define further render modes.
You can create separate presentation templates for each type and select them when you create a site area template or content template: |
MyLinkElement
:[Content uuid="[Element key='MyLinkElement' format='id']"]
portalContext
, portletContext
, portalMapping
,
or autofill
:[Content context="portalContext"]
[Content path="/Web Content/My Site Area/My Content"]
[Content path="./My Content"]