Reference a Federated content element
The federated content element tag is used to reference a federated content element within a presentation template or element design.
<FederatedCmpnt type=" " context=" " name=" " key=" " scope=" " attributename=" " format=" " start=" " end=" " />
<FederatedCmpnt Opens the tag. type=" " This determines where the element is being referenced from. Either "content", "sitearea" or "site". context=" " This determines which item is being referenced.
- Selected
- Refers to a particular item as specified in the name attribute below.
- Current
- This will reference the element from the current site, site area or content file that is being browsed by the user.
- AutoFill
- The element being referenced will be determined by the search parameters of a menu, navigator or taxonomy component.
name=" " Enter the name and library of the item the element is being referenced from. For example,... name="library/item"To use the library specified in the URL of the current page, use...
name="./item"The "name" parameter is not used if context=current or context=autofill.
key=" " This is the name of the element being referenced. scope=" " The scope specifies what will be returned from the selected federated content:
- content
- Display the content of the federated content.
- contenturl
- Display the URL to the federated content.
- attribute
- Display a particular attribute of the federated content.
attributename=" " If scope="attribute", use this parameter to specify the attribute to display. format=" " Used to specify the display format of dates and numbers. start=" "
end=" "The start and end attributes are used to wrap the data returned by an IWWCM ™ tag within other tags, such as HTML. These attributes are not mandatory. /> Closes a Web Content Management tag. When using this tag, only required parameters should be used. Do not include parameters that are not required, or that contain no settings.
Examples:
Display the attributes of federated content:
To display the "title" of federated content, the following tag could be used:
<FederatedCmpnt type="content" context="current" key="elementname" scope="Attribute" attributeName="title" />To display the "last modified" date of federated content...
<FederatedCmpnt type="content" context="current" key="elementname" scope="Attribute" attributeName="lastModified" format="dd/MM/yyyy" />
Display the content of federated content:
Only federated content of the type "text/*" can be rendered as content. To display the content of federated content...
<FederatedCmpnt type="content" context="current" key="elementname" scope="content" />
Display the URL of federated content:
To display the URL of federated content...
<FederatedCmpnt type="content" context="current" key="elementname" scope="contenturl" />
Display the URL of federated content as a link:
To display the URL of federated content as a link in a Web page...
<a href=" <FederatedCmpnt type="content" context="current" key="elementname" scope="contenturl" /> "> <FederatedCmpnt type="content" context="current" key="elementname" scope="Attribute" attributeName="title" /> </a>
Display an image stored as federated content:
To display an image stored as federated content...
<img src="<FederatedCmpnt type="content" context="current" key="elementname" scope="contenturl"/>" >
Parent Topic
Reference elements
Work with DB2 Content Manager