AnsweredAssumed Answered

Freemarker Custom View

Question asked by dinger on Feb 13, 2008
Latest reply on Mar 12, 2010 by stephane.botello
I'm trying to write a custom view that displays files that have a custom aspect added (and hence custom metadata). I want to be able to sort on the the custom metadata field.

To achieve this I'm using a list?sort_by(["properties","custom:metadata"]) type sort and then displaying the results. However, if the current node doesn't have the specified property then it doesn't work. Not all nodes are guaranteed to have the custom field so I need to do a pre-filter first.

How do I achieve this in Freemarker? I've tried creating a list within a list but it doesn't work.