Forums / General / sort_by..
Lo' F.
Monday 15 November 2010 5:56:05 am
Hi,
- Where can I find, in the documentation, a list of allowed options for sort_by parameter of a fetch statement?
- If I use published will that resort the objects if, let's say, I edit an old object and click on publish. Will this move it on the top of the list?
- $node.sort_array sorts the array based on?
- Can anybody please also tell me what's the difference between using true() or false() after that? Is that meant to reverse the order?
Thanks a lot!
loredanaebook.it
Gaetano Giunta
Monday 15 November 2010 6:11:15 am
- http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Modules/content/Fetch-functions/list
Not really hard to find, imho... :-P
- $node.sort_array sorts the same way as the editor assigns in the admin interface, be it by date, name etc...
- True/False is used for sorting ascending or descending, as you guessed.
Principal Consultant International Business Member of the Community Project Board
Monday 15 November 2010 6:16:37 am
..bloody hell! Didn't scroll that page down :)
Thank you so so so much!
.. about using published I am afraid the order can be altered if an old object is edited again. I need to set the order based on when they are inserted first time. The fetch retrieves all the objects tree from the current node down..
Peter Keung
Monday 15 November 2010 7:52:04 am
That should not be the case unless you have a workflow that manually updates the publish date.
http://www.mugo.ca Mugo Web, eZ Partner in Vancouver, Canada
Monday 15 November 2010 9:06:09 am
published = time of 1st publication
modified = time of last editing