We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12168
    • 19 Posts
    Just wondering if anyone else is having these problems. I can not seem to do anything useful with ditto, in revolutions. It always gives me a No documents found result.

    If I try to &sortBy anything except createdon, then I get a result of No documents found.
    I have tried &orderBy as well and get the same result.

    Issue &sortBy=`editedon` or &sortBy=`publishedon`
    [[Ditto? &id=`1`&parents=`0` &sortBy=`editedon`]]

    Result:

    No documents found.


    Notice the Date: 31-Dec-69 19:33... Should be: 24-Nov-09.....
    [[Ditto? &id=`1`&parents=`0` &sortBy=`createdon`]]

    Result:

    3.html
    by Default Admin User on 31-Dec-69 19:33

    2.html
    by Default Admin User on 31-Dec-69 19:33

    1.html
    by Default Admin User on 31-Dec-69 19:33


    I can &orderBy=`menuindex ASC` - Still having the date problem
    [[Ditto? &id=`1`&parents=`0` &orderBy=`menuindex ASC`]]

    Result:

    1.html
    by Default Admin User on 31-Dec-69 19:33

    2.html
    by Default Admin User on 31-Dec-69 19:33

    3.html
    by Default Admin User on 31-Dec-69 19:33


      • 12168
      • 19 Posts
      Anyone have any idea’s? I need to figure out a solution.

      Thanks in advance
        • 3749
        • 24,544 Posts
        I think you need to use orderBy and include a sort direction:


        [[Ditto? &id=`1` &parents=`0` &orderBy=`editedon DESC`]]
        [[Ditto? &id=`1` &parents=`0` &orderBy=`editedon ASC`]]


        Not sure if it matters, but put a space before the &id parameter.

        I think there are also some possible mismatches between Ditto versions and Revo Beta versions.

        Another possibility is to use getResources instead of Ditto. It looks like it would work for what you want.
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 12168
          • 19 Posts
          I tried a bunch of Ditto call combinations and still nothing.