Big apologies if this has been asked and answered many times before:
Is there a way to have the results returned by $modx->getDocumentChildren() sorted by pub_date or createdon? Or do I have to take the resulting array and do a sort on one of the keys?
Is there a comparable function to getDocumentChildren() that does have a sorting flag built in?
Thanks in advance. MODx rocks!
Andrew
Thanks so much, Garry!
After I read your response I got smart and searched for the function in document.parser.class.inc.php so I could see how the function was actually defined. Works great!
Thanks again!
Andrew
Hey Andrew, could you post an example of how you’re calling getDocumentChildren to sorty by pub_date? I’ve been playing with it for far too long with no success.
Thanks!
-Brett