This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Install & configuration » Templates, fetch and sorting

Templates, fetch and sorting

Templates, fetch and sorting

Tuesday 14 January 2003 8:28:34 am

Having a need to sort the contents of a fetch I did some digging and have found some information in regards to the "sort_by" parameter of the fetch(content,tree,hash(parameters)) template function (and probally fetch(content,list,hash(parameters)) as well)

sort_by takes (multiple groups - I haven't tried this but the code looks like it will) of 2 parameters

sort field - the field to sort by. Valid options are

true = ascending
false = desending



Will return all nodes under node 29 ordered from the first published to the last published.

If you do not have 2 parameters the sort will default to "path ascending"

I have also patched the system (3 additional lines) to enable to sort by object name. (See )

Hope this helps someone.

No reply yet!


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from