Hi,
There seems to be lots of talk about Ditto 2.1 sorting by multiple fields but I can’t find any information how I can actually do this. I have a Ditto call that I need to sort by a TV called "Year" and then alphabetically by "longtitle". So far I have:
[!Ditto? &startID=`150` &tpl=`ditto_gshyear` &sortBy=`year` &sortDir=`ASC` &display=`all` &descendentDepth=`1` &summarize=`8` &paginate=`1` &paginateAlwaysShowLinks=`1`!]
I tried: &sortBy=`year,longtitle` on the off chance but that doesn’t work. I’ve seen a multiSort function on the Ditto website but it’s not clear how to use it.
All help much appreciated.
That’s great but it has inspired me to try something more complicated. Can I create a single Ditto call/chunk combination that will produce a list sorted under headings e.g.:
Year 1
_____
Item A
Item B
Item C
Year 2
-----
Item A
Item B
Item C
At the moment I have a nuber of lists like this but I have a sperate Ditto call for each heading. So the first has everything sorted alphabetically and then filters out everything not Year 1, the second the same but filters everything but Year 2 and so on. Can I use the orderBy parameter to do something like this all in the one Ditto call?