Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Web content Template image list sort by freemarker
Hi,I have add ten images through web content structure and want to iterate those by freemarker template coding as provided below, but I want to sort it by date of image upload, which I can't. Kindly help me to do so. My list iteration coding in as below. I want to sort it by date but do not know what is the exact field for the same.
<#if BannerWCMImage.getSiblings()?has_content>
<#list BannerWCMImage.getSiblings() as cur_CarouselImage>
<div> <a href="${cur_CarouselImage.BannerWCMLink.getFriendlyUrl()}"> <img src="${cur_CarouselImage.getData()}" />
</a> </div> </#list>
</#if>
<#if BannerWCMImage.getSiblings()?has_content>
<#list BannerWCMImage.getSiblings() as cur_CarouselImage>
<div> <a href="${cur_CarouselImage.BannerWCMLink.getFriendlyUrl()}"> <img src="${cur_CarouselImage.getData()}" />
</a> </div> </#list>
</#if>
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™