content:assetUrls

This tag will get you the asset urls taken from one or many contents bound by a property.

Parameters

Name

Required

Default

Type

Description

Id

true

 

String

The result is stored in this variable.

propertyName

true

 

Object/String

The property name the component used to bind the content by in which you wish to get the asset urls 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 Collection containing the urls to the assets.

Examples

The following example gets all assets bound to the multiple asset binding property “Images”. The loop just prints the urls and does nothing with them. This is of course just an example – you have to decide what to do with them.

<content:assetUrls id="imageUrls" propertyName="Images" useInheritance="false"/>
<c:forEach var="imageUrl" items="${imageUrls}" varStatus="status">
    <c:out value="${imageUrl}"/>
</c:forEach>



comments powered by Disqus