content:contentVersion

This tag fetches the latest content version object so you can get the properties of that object.

Parameters

Name

Required

Default

Type

Description

id

true

 

String

The result is stored in this variable.

contentVersionId

false

 

Object/String

The id of the contentVersion we wish to get. Not common to use.

content

false

 

Object/String

The content on which to get the last version in the current mode.

languageId

false

 

Object/String

If set the tag returns looks for a last version matching that laguage. Defaults to the users current site language.

useLanguageFallback

false

 

Object/String

Sets if the tag should fallback to the master language if it does not find any version in the given language.

 

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

Examples

The following example gets the latest content version object based on the content object previously fetched. It then gets the latest editor and presents his/her name.

<content:contentVersion id="articleContentVersion" content="${articleContent}"/>
<management:principal id="articleModifyer" contentVersion="${articleContentVersion}"/>
The article was last changed by <c:out value="${articleModifyer.firstName}"/> <c:out value="${articleModifyer.lastName}"/>



comments powered by Disqus