How can I get the url of a page image when looping through the children using sightly?
Here is what I have been trying with no success:
<div data-sly-list.subChild="${child.listChildren}">
<img src="${subChild.image.properties.fileReference}">
</div>
Thanks!
Solved! Go to Solution.
Views
Replies
Total Likes
You would need to get at the correct node under a page that has this property:
Personally - if I had that requirement, I would do that in the Java part of an HTL component and populate a collection and then simply write out the collection in the HTL component.
Views
Replies
Total Likes
What do you mean with "page image"?
Views
Replies
Total Likes
It's a page property
Views
Replies
Total Likes
You want to locate an image in a page and try and get the URL that resolves the image?
Views
Replies
Total Likes
It's an image set in a page property, yes.
Views
Replies
Total Likes
You would need to get at the correct node under a page that has this property:
Personally - if I had that requirement, I would do that in the Java part of an HTL component and populate a collection and then simply write out the collection in the HTL component.
Views
Replies
Total Likes
Views
Likes
Replies