content:assignedCategories

This tag fetches the assigned categories for a certain content version.

Parameters

Name

Required

Default

Type

Description

id

true

 

String

The result is stored in this variable.

contentId

false

 

Object/String

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

propertyName

false

 

Object/String

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

languageId

false

 

Object/String

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

categoryKey

false

 

Object/String

What category key should be checked.

useAttributeLanguageFallback

false

 

Object/String

Sets if the tag should fallback to the master language if it does not find any assigned categories in the given language event though a content version exists.

useLanguageFallback

false

true

boolean

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

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.ContentCategory-object.

Examples

The following example gets a list of ContentCategory-objects assigned to the latest content version in the current language on the content bound by the property Article. It also prints the list and shows off another tag which gives you the full path.

<content:assignedCategories id="categories" propertyName="Article" categoryKey="Area"/>
<c:forEach var="category" items="${categories}" varStatus="count">
    <c:out value="${category.id}"/>
    <management:categoryPath id="path" categoryId="${category.id}"/>
    path: <c:out value="${path}"/><br>
</c:forEach>



comments powered by Disqus