content:assets

This tag will get you the assets available on a content in the current language version, either bound though a property or referenced by a content id.

Parameters

Name

Required Default Type Description
id true   Object/String The result is stored in this variable.
contentId false   Object/String The id of the content you wish to get the assets from.
propertyName false   Object/String The property name the component used to bind the content by in which you wish to get the assets 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.

 

ID-result variable contains: An list of DigitalAssetVO-objects.

Examples

The following example gets the assets from the content bound by the component property "Article" and shows the image as well as the asset size.

<content:assets id="assets" propertyName="Article"/>
<c:forEach var=”asset” items=”${assets}”>
<content:assetUrl id="imageUrl" digitalAssetId="${asset.id}"/>
Asset: <img src="<c:out value="${imageUrl}"/>"/> <c:out value="${asset.assetFileSize}"/>
</c:forEach>

 



comments powered by Disqus