content:childContents

This tag will get you a list of child contents beneath a content, either bound though a property or referenced by a content id.

Parameters

Name

Required

Default

Type

Description

id

true

 

String

The result is stored in this variable.

contentId

false

 

Object/String

The id of the content you wish to get the attribute value from.

propertyName

false

 

Object/String

The property name the component used to bind the content by in which you wish to get the attribute value from.

useInheritance

false

true

boolean

Sets if the component should look for other articles on other components with the same propertyname, either on the same page or on pages above.

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.

searchRecursive

false

false

Object/String

If set to yes up to three levels of recursion will take place so InfoGlue will go though folders as well and add items in them to the list.

sortAttribute

false

NavigationTitle

Object/String

Will decide what attribute to sort the collection of contents on. Any attribute name is ok as well as name, publishDateTime and expireDateTime.

sortOrder

false

ascending

Object/String

'asc' or 'desc' are valid arguments. Just like a sql-orderby.

includeFolders

false

false

Object/String

If set to true the list will also contain folder contents and not just plain contents.

 

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

Examples

The following example gets all the children to the folder content bound by the component property "ArticleFolder" and prints out the attribute Title on each one of them.

<content:childContents id="articles" propertyName="ArticleFolder"/>
<c:forEach var="article" items="${articles}" varStatus="count">      
<content:contentAttribute id="Title" contentId="${article.contentId}" attributeName="Title"/>
<c:out value="${Title}"/><br/>
</c:forEach>



comments powered by Disqus