content:content

This tag fetches a content object so you can get the properties of that object or get related objects in the object model.

Parameters

Name

Required

Default

Type

Description

id

true

 

String

The result is stored in this variable.

siteNodeId

false

 

Object/String

The page to search for the property name on. Very useful to get contents on other pages.

contentId

false

 

Object/String

If set the tag returns the content object with this contentId.

propertyName

false

 

Object/String

If set the tag returns the content object bound on this property name.

useInheritance

false

 

boolean

Sets if the tag should look at inherited properties if the given propertyName was not assigned on the current component.

useRepositoryInheritance

false

true

Boolean

Sets if the component should use repository inheritance when looking for inherited items.

useStructureInheritance

false

true

boolean

Sets if the component should use inherit properties from it’s parent site nodes.

 

ID-result variable contains:
A org.infoglue.cms.entities.content.ContentVO-object.

Examples

The following example gets the content object bound to the property "Article". It then gets the original creator and presents his/her name.

<content:content id="articleContent" propertyName="Article" useInheritance="true"/>
<management:principal id="articleCreator" userName="${articleContent.creatorName}"/>
The article was created by <c:out value="${articleCreator.firstName}"/> <c:out value="${articleCreator.lastName}"/>



comments powered by Disqus