content:relatedContents

If you have used the content relation editor on a content attribute and added related contents, to for example an article, this tag lets you get those related contents.

Parameters

Name

Required

Default

Type

Description

id

true

 

String

The result is stored in this variable.

contentId

true

 

Object/String

The id of the content you wish to get the related contents from.

attributeName

true

 

Object/String

The name of the attribute containing the related contents.

onlyFirst

false

 

Object/String

Sets if the tag should only return the first related content. Otherwise a list will allways be returned.

 

ID-result variable contains:
An list of org.infoglue.cms.entities.content.ContentVO-objects.

Examples

The following example gets a list of contents related to the articleContent on attribute with name RelatedArticles.

<content:relatedContents id="relatedArticles" contentId="${articleContent.contentId}" attributeName="RelatedArticles"/>



comments powered by Disqus