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
sortTool in velocity template of asset publisher
Hi all, i wish sort my list of entries by publish date. this is my peace of code
foreach ($curEntry in $sortTool.sort($entries, "publishDate:desc"))
This work, but if i reduce the number of journal article visible in the page (in configuration), i lost the sort. Can any help me?Thank you

This work, but if i reduce the number of journal article visible in the page (in configuration), i lost the sort. Can any help me?Thank you
You can just configure the Asset Publisher to sort entries by publishDate. So you won't need extra code inside your template to sort the entries.
Hi Dominik,i had done it already but sorting by date seems not to work in liferay 6.2 ga1. For this i have add logic in my template.
Can you help me?
Can you help me?
The $entries object only contains the assets which are visible. So if you reduce the number of assets it will only sort those.
I don't know if there is actually a bug about sorting by date in Asset Publisher. Liferay 6.2 GA1 is rather old. Maybe you should consider to update to at least the latest 6.2 GA7.
I don't know if there is actually a bug about sorting by date in Asset Publisher. Liferay 6.2 GA1 is rather old. Maybe you should consider to update to at least the latest 6.2 GA7.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™