We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49667
    • 59 Posts
    Hi,

    I have a very basic Ditto call:
    [!Ditto? &parents=`45` &display=`3` &randomize=`1` !]


    What I would like is that from multiple parent IDs, i.e. 45; 52; 60; and 63, three resources are shown from EACH parent. Is that possible?

    Q2: Can I also specificy somehow that from parent ID 45, only 2 resources get displayed AND from ID 52, only 1 resource gets displayed, AND from ID 60 only 4 resources get displayed? If so, how?

    Thanks.
      • 49667
      • 59 Posts
      Ah OK, just came to me that I could do this...

      [!Ditto? &parents=`45,52,60,63` &display=`3` &randomize=`1` !]


      That works.

      But how to set the display number for EACH parent ID separately??
        • 13428 ☆ A M B ☆
        • 1,031 Posts
        Create a documents list by nested Ditto calls:

        [!Ditto?
        &documents=`[!Ditto? &parents=`45`, &display=`3` &tpl=`@CODE:[+id+],`!],[!Ditto? &parents=`52`, &display=`3` &tpl=`@CODE:[+id+],`!] …` 
        &randomize=`1`
        !]
          • 49667
          • 59 Posts
          Hi Jako,

          Thank you for your reply.

          This is too advanced for me now, I have to scale up my reading (and understanding) of Ditto.

          The &tpl parameter gives me parse errors. I guess I am doing something wrong...
            • 13428 ☆ A M B ☆
            • 1,031 Posts
            Sorry, try:
            &tpl=`@CODE [+id+],`