AnsweredAssumed Answered

FreeMarker sort and sort_by

Question asked by lesteinb on Jan 27, 2006
Latest reply on Nov 27, 2006 by simon
Hi There,

I'm trying create lists that can be sorted by various document properties.

You can sort by "name" - this works:

<#list companyhome.childByNamePath["Users/Leroy
Steinbacher/photos"].children?sort_by("name") as child>
${child.properties.name} - ${child.properties.description}<br>
</#list>

But it doesn't like it if you try to sort by "description" or any other document property:

<#list companyhome.childByNamePath["Users/Leroy
Steinbacher/photos"].children?sort_by("properties.description") as child>
${child.properties.name} - ${child.properties.description}<br>
</#list>

Any suggestions?

Thanks,

Leroy

Outcomes