I’m a newcomer to Modx so this is probably something very simple Im overlooking but I’ve been banging my head against this all morning and haven’t found an answer in any of tutorials or topics here so Im hoping someone can help.
Heres the ditto call:
[[Ditto? &parents=`9` &tpl=`NewsItem` display=`all` dateSource=`pub_date` sortBy=`pub_date` sortDir=`DESC` depth=`5` &debug=`1`]]
9 is the id of the parent document of the children I want to display and this code is on page 9.
Attaching the debug file as well.
From what I can tell, the snippet is treating the call as if I hadnt sent the sortBy variable to it. I know there’s an issue with blank publish dates so I have confirmed that all documents have a publish date. The date also shows up correctly on the page, it just doesn’t sort by it.
Any ideas, much appreciated.
I think it should be `publishedon` rather than `pub_date` throughout your snippet call.
Tried swapping to `publishedon` but no change. It does seem like Ditto is ignoring my sortBy and SortDir declarations and just resorting to default.
That was it. Damn rookie mistake, at least I wont be making that one again.
Thanks for the help!