AnsweredAssumed Answered

Freemarker sort_by

Question asked by tfpadilla on Aug 27, 2008
Latest reply on Aug 29, 2008 by tfpadilla
Hi everybody,

I have created a custom type of documents and a custom type of folder for containig them.

For showing the documents in a custom view I have created a template.

I need to sort the documents by one of the custom properties but I don't know how to do it.

Reading some posts I have tried with:

<#list space.children?sort_by(["properties","fact:cuenta"]) as child> but it doesn't work.

The error I get is:
Error during processing of the template '?sort_by(…) failed: The "fact:cuenta" subvariable (specified by ?sort_by argument number 2) was not found.'. Please contact your system administrator.

Also i tried with
#list space.children?sort_by(['properties','fact:cuenta']) as child> but I get the same error.

Could anyone help me, please?

Thanks in advance,