We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32645
    • 377 Posts
    I’ve got a sitemap which uses Ditto starting at 0, and shows all pages. My template is very basic;

    // This Ditto call appears in my page
    <ol>
    [[Ditto? &sortBy=`menu_index` &display=`all` &startID=`0` &depth=`0` &showInMenuOnly=`1` &sortDir=`ASC` &tpl=`Template_Sitemap`]]
    </ol>
    


    // This is my Ditto "Template_Sitemap" template
    <li>
    <a href="[~[+id+]~]">[+pagetitle+]</a>
    </li>
    


    But the problem is, it just lists all my documents in one big list.

    How do I make Ditto make it displays child lists properly, like this example:


    // This is how I would like my Sitemap to look

    - Home
    + Page Container
    - Page Child 1
    - Page Child 2
    - About us
    + Page Container
    - Page Child 1
    - Page Child 2
    - Page Child 3
    ...

    I know in Wayfinder you can use Inner Templates, Inner Rows - but is there a way of using Ditto to do something similar?



      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Ditto doesn’t do that. Use Wayfinder. You can use custom chunk templates to do the ol you want with Wayfinder as well.
        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
        • 32645
        • 377 Posts
        Okay.

        Thank you for your help!

        *closed*