We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6531
    • 154 Posts
    I’ve searched all the documentation ... and all I can find is "orderby=An array that holds all criteria to sort the result set by."

    I don’t know what this means. What’s an array? How do I use one in my Ditto call?

    I want to get my Ditto results sorted by menuindex. I tried [tt]&sortBy=`menuindex`[/tt] but this has no effect.

    Just upgraded to 2.1, but that didn’t help.

    HELP!
      • 6531
      • 154 Posts
      UPDATE: I think the problem is that I am using nested Ditto calls. The ’outer’ call sorts correctly; the ’inner’ call does NOT.

      The outer call is:
      [tt][[Ditto?tpl=`TeamGalleryTpl` &display=`all` &sortBy=`menuindex` &sortDir=`ASC`]][/tt]

      This generates a list of documents, each of which makes this ’inner’ call:
      [tt][!Ditto?documents=`[*BioWorks*]` &tpl=`BioGalleryTpl` &sortBy=`menuindex` &sortDir=`ASC` &display=`all` &noResults=` `!][/tt]

      After trial and error, the Outer had to be [[...]], and the inner [!...!] for this to work at all. But now the ’inner’ does not sort!

      Any ideas?

      Thanks!
        • 6531
        • 154 Posts
        UPDATE^2:

        OK, I’m an idiot. I thought I was using a chunk, but I wasn’t. So editing the chunk had no effect. Oops.

        I’d delete the topic, but I can’t ...
          • 10940
          • 71 Posts
          har har