Displaying multilevel structure with Ditto is easy doable with the use of recursion (on several occasions on this forum I provided similar solutions). Here it goes one more time, you can adjust it to fit your needs.
Suppose, we need to display with a single Ditto call the document map for entire site (a kind of poor replacement for Wayfinder):
[[Ditto? &parents=`0` &depth=`1` &display=`all` &tpl=`one-level` &orderBy=`menuindex ASC`]]
The above will display first (highest) level of documents, but with an appropriate content of "one-level" chunk we can cause displaying all remaining levels:
<!-- content of "one-level" chunk -->
<div style="margin: 0 0 0 20px;">
<!-- this part displays current level of the documents -->
<p><a href="[~[+id+]~]">[+pagetitle+]</a></p>
<!-- this part recursively displays one level deeper - children of the document being processed above -->
[[Ditto? &parents=`[+id+]` &depth=`1` display=`all` &tpl=`one-level` &noResults=`empty` &orderBy=`menuindex ASC`]]
</div>
Nested Ditto call still uses "one-level" chunk for rendering documents, so it will be replicated as many times as many levels you have in your site tree (in practice, this self-replication is limited to 10 -- the default maximum for MODx parser’s passes).
The important detail is &noResults=`empty` used for rendering when Ditto (going deeper) reaches document having no children (leaf). I use for this purpose something like this:
<!-- content of "empty" chunk -->
[+non-existent-var+]
TV "non-existent-var" -- as unresolved placeholder -- will be replaced with empty text.
Also please notice that children will be wrapped with nested div-containers that will indent each consecutive level of documents with 20 pixels more.