We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24731 ☆ A M B ☆
    • 211 Posts
    Hi all, I just began playing with Ditto this weekend and I am far away from Mastering its powerful features. I am wondering if there is a smarter or more efficient way to achieve what I want to do. Here is what I have right now which works:

    [[Ditto? &format=`html` &parents=`2` &depth=`1` &display=`1` &tpl=`WeeklyPick` &hideFolders=`1` &sortDir=`DESC` &sortBy=`createdon` &showInMenuOnly=`1`]]
    [[Ditto? &format=`html` &parents=`3` &depth=`1` &display=`1` &tpl=`WeeklyPick` &hideFolders=`1` &sortDir=`DESC` &sortBy=`createdon` &showInMenuOnly=`1`]]
    [[Ditto? &format=`html` &parents=`4` &depth=`1` &display=`1` &tpl=`WeeklyPick` &hideFolders=`1` &sortDir=`DESC` &sortBy=`createdon` &showInMenuOnly=`1`]]
    [[Ditto? &format=`html` &parents=`5` &depth=`1` &display=`1` &tpl=`WeeklyPick` &hideFolders=`1` &sortDir=`DESC` &sortBy=`createdon` &showInMenuOnly=`1`]]
    [[Ditto? &format=`html` &parents=`6` &depth=`1` &display=`1` &tpl=`WeeklyPick` &hideFolders=`1` &sortDir=`DESC` &sortBy=`createdon` &showInMenuOnly=`1`]]
    [[Ditto? &format=`html` &parents=`7` &depth=`1` &display=`1` &tpl=`WeeklyPick` &hideFolders=`1` &sortDir=`DESC` &sortBy=`createdon` &showInMenuOnly=`1`]]
    [[Ditto? &format=`html` &parents=`8` &depth=`1` &display=`1` &tpl=`WeeklyPick` &hideFolders=`1` &sortDir=`DESC` &sortBy=`createdon` &showInMenuOnly=`1`]]
    [[Ditto? &format=`html` &parents=`9` &depth=`1` &display=`1` &tpl=`WeeklyPick` &hideFolders=`1` &sortDir=`DESC` &sortBy=`createdon` &showInMenuOnly=`1`]]
    [[Ditto? &format=`html` &parents=`10` &depth=`1` &display=`1` &tpl=`WeeklyPick` &hideFolders=`1` &sortDir=`DESC` &sortBy=`createdon` &showInMenuOnly=`1`]]

    Basically what I am after is, getting one entry from each parent. I want the entry to be the last one created, while I want the parents with a customized order.

    Parent A
    -> Last created Children
    Parent B
    -> Last created Children
    Parent C
    -> Last created Children

    .... and so on.

    So I am wondering if there is a way to achieve this with just one single call instead of making one call per parent as my sample above. Any ideas?

    Regards,
    Jose R. Lopez
      • 6726
      • 7,075 Posts
      Hi smiley

      If I remember correctly you can have multiple parents listed, comma separated :

      [[Ditto? &format=`html` &parents=`1,2,3,4,5,6,7,8,9,10` &depth=`1` &display=`1` &tpl=`WeeklyPick` &hideFolders=`1` &sortDir=`DESC` &sortBy=`createdon` &showInMenuOnly=`1`]]


        .: COO - Commerce Guys - Community Driven Innovation :.


        MODx est l'outil id
        • 24731 ☆ A M B ☆
        • 211 Posts
        Quote from: davidm at Apr 23, 2007, 05:01 PM

        Hi smiley

        If I remember correctly you can have multiple parents listed, comma separated :

        [[Ditto? &format=`html` &parents=`1,2,3,4,5,6,7,8,9,10` &depth=`1` &display=`1` &tpl=`WeeklyPick` &hideFolders=`1` &sortDir=`DESC` &sortBy=`createdon` &showInMenuOnly=`1`]]




        Yeah, I had tried that, forgot to mention it, but then I continue to get only one result. If i increase the display to 10 I get the latest 10 entries regardless of their parent, I need only one entry per parent.
          • 18397
          • 3,250 Posts
          I don’t think there is an easier way to do what you describe other than the method you are already using.
            • 24731 ☆ A M B ☆
            • 211 Posts
            Quote from: Mark at Apr 24, 2007, 09:45 AM

            I don’t think there is an easier way to do what you describe other than the method you are already using.

            Okay, no problem. Thanks a lot, I just wanted to make sure I was not abusing the requests to the snippet.

            Thanks anyways.

            Jose R. Lopez