We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8461
    • 205 Posts
    In the docs

    &sortBy

    This parameter tells Ditto what field to sort the output list by.

    Recommended fields include createdon, pub_date, editedon.

    If Ditto can’t find the field you specify, then it reverts to createdon.

    I tried using menuindex vut that does not seem to work with Ditto2, is this still an option ?

    also i have tired sortID, parent/s and documents/s and used editeon and none of these seem to work for my call

    [!Ditto? &parent=`3` &tpl=`dittoProducts` &extenders=`summary` &sortBy=`editdon` !]

    Many thanks
      • 18397
      • 3,250 Posts
      In your call, you have &sortBy set to editon. The correct value would be editedon. Regarding menuindex, it should work. Please provide the debug output of the call by completing the following steps:
      * Append &debug=`1` to the call
      * Click "Save Debug Console"
      * Rename the extension to .txt
      * Attach to your post
      You may also want to try upgrading to the latest SVN version of Ditto available at http://www.modxcms.com/ditto_download.html
        • 8461
        • 205 Posts
        file attached, thanks
          • 18397
          • 3,250 Posts
          The file you provided is empty. Can you try uploading it again?
            • 8461
            • 205 Posts
            Mark, please go here, URL REMOVED I will leave debug active for 15 mins
              • 18397
              • 3,250 Posts
              It is sorting by menuindex already. However, &sortDesc defaults to DESC whereas menuindex is normally ASC. So simply add &sortBy=`ASC` to your call and you should be set.
                • 8461
                • 205 Posts
                Mark, thanks

                What you doing still up so early in the morning anyway!