Order by last updated date of parent OR child
nav_first.pngFirst: thread:378
extendable data forms / repeatable fields
Edited: 13 Oct 2011 03:09 by: Ben Miller
Comments: 4
nav_prev.pngPrevious: thread:316
Error blocks - class standardization
Edited: 02 Mar 2010 22:40 by: TeRq
Comments: 1
Last: thread:194
Extra ordening mechanism
Edited: 09 Dec 2009 15:27 by: Steven Heynderickx
Comments: 1
Next: thread:232
ListValues module DRAFT version
Edited: 07 Jan 2010 21:31 by: Steven Heynderickx
Comments: 6

leigerleiger wrote on 14 Jan 2010 05:25

As you can see on this forum and also on the NoComment forum, pages can be used instead of the comments module to imitate a forum structure.

However, when sorting threads in a section of the forums I only have order="created_at" and order="updated_at" at my disposal, as well as the reverse of both of those ordering types (order="created_at desc" and order="updated_at desc", respectively).

I need to be able to order threads in a way that is similar to 'created_at desc', but that will be influenced not only by the thread's creation date, but also by the creation date of a thread's children (which are replies that people have made to that thread)

Something like order="children_created_at desc" will work… and if the thread doesn't have any children, then the thread's own creation date should be used.

  • Is this possible, and what should the syntax be? My example of 'children_created_at desc' looks a bit messy IMO.
  • Should this also be supported in reverse? 'parent_created_at' and 'parent_updated_at' ? I can't think of a use case but it would be consistent to cover all avenues

Start a new sub-thread

Comments: 0

Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License