Can I sort/view the items in a folder by date created (and other metadata fields)?

Melissa's Avatar

Melissa

17 Dec, 2010 04:32 PM

I would like to view our media releases by the date we created them - is that possible? Is there a way to customize what columns are shown in the folder view?

  1. 1 Posted by Charlie Holder on 20 Dec, 2010 04:02 PM

    Charlie Holder's Avatar

    You can use the Velocity Sort Tool to sort the results from an XPath. If your XPath contains a list of all the system-page nodes that contain your media release information, simply use the Sort Tool immediately following that XPath definition to sort the list.

    Possible solution could be as easy as:

    #set ($articles = $_XPathTool.selectNodes($contentRoot, "/system-index-block/system-page/your/path/"))
    $_SortTool.addSortCriterion("created-on","","number","descending","")
    $_SortTool.sort($articles)
    

    Note that I have already inserted "created-on" as the first parameter in the list of arguments that .addSortCriterion requires. The first parameter is the node you wish to sort on.

    More information about the Sort Tool can be found in the "Technical" section of the Script Formats page in the Knowledge Base.

  2. Charlie Holder closed this discussion on 30 Dec, 2010 04:43 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac