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

    I’ve been trying to get the Ditto snippet to work to display the child documents under a parent document.

    My current hierarchical structure is like this:
    Home (1)
    Articles (3)
    Article 1 (4)
    Article 2 (5)
    Article 3 (6)
    Article 4 (7)
    Article 5 (8)
    About Us (9)
    Contact Us (10)

    The reason it has skipped two is because I deleted that document.

    I’ve tried putting numerous parameters inside the ditto call such as [!Ditto? &parents=’3’ &display=’5’ !] etc etc (also created a chunk and added the tpl parameter to the ditto call), but they all returned the following "No documents found.".

    However when I tried [!Ditto? &parents=’3’ !], it displays the following:

    Contact Us
    by Default admin account on 20-Apr-09 19:47
    About Us
    by Default admin account on 20-Apr-09 19:46
    Articles
    by Default admin account on 20-Apr-09 17:07
    Home
    by Default admin account on 26-Oct-05 15:32

    It looks like the ditto call isn’t reading the parent id and is displaying every parent document in my structure.

    Any help would be greatly appreciated!

    Cheers.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      That should be backticks `...` and not single-quotes ’...’
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 21725
        • 2 Posts
        well there you have it! thanks heaps for that smiley