I'm having a hard time getting just the latest document from a series of folders... The documents are news articles, and they're organized in subfolders by year. Unfortunately, instead of creating them from oldest to newest, we started with the new ones and worked back, so we can't use createdon usefully (note to self: from now on always add dated material beginning with the oldest!).
The folders are like so:
- 2008 (68)
- 2007 (67)
- 2006 (65)
- 2005 (64)
- 2004 (63)
- 2003 (62)
- ...and on back to 1998, but that doesn't much matter
and each article within these subfolders has an alias based on its date (e.g., "10-03" or "02-12").
So I thought I could just grab all of the docs in each of these folders and sort them first by parent id and then by alias, and that would always give me the latest article (matching a tag, etc.). But it's not working as I expect. I'm getting documents from the oldest folders first.
This is my Ditto call:
[[Ditto? &parents=`68,67,65,64,63,62` &summarize=`1` &total=`1` &tpl=`newsblurb` &paginate=`0` &alwaysshow=`1` &sortBy=`parent,alias` &sortDir=`DESC` &displayArchive=`0` &depth=`1` &trunc=`0` &tagDelimiter=`,` &tagData=`tvtags` &tagMode=`onlyTags` &tags=`[*menutitle*]`]]
Anyone understand why this is happening (and even better how to resolve it or get the results that I need using some other method)? I guess I could go back through them all and add published dates and sort by those, but I'd really rather not have to do that. There's gotta be a way to make this work!