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

    Im trying to get ditto to display a list of child elements from various parents but im having no luck so far, its just listing them all in order.

    I want to acheive;

    Parent1
    Child 1
    Child 2

    Parent 2
    Child 1

    However the best ive managed to get is

    Parent 2
    Parent 1
    Child 2
    Child 1
    Child 3

    the call ive got so far is

    [[Ditto? &startID=`[*Month*]` &tpl=`Section-Content`&depth=`2` &orderBy=`parent ASC` ]]


    and the section content tpl is for testing purposes;

    [+pagetitle+]<br/>
    [+content+]


    TIA
      • 4172
      • 5,888 Posts
      you can have nested Ditto-calls:

      [!Ditto? &parents=`[*Month*]` &tpl=`Section-Content`&depth=`1` &orderBy=`menuindex ASC` !]


      Section-Content:
      [+pagetitle+]<br/>
      [+content+]
      [[Ditto? &parents=`[+id+]` &tpl=`child-Section-Content`&depth=`1` &orderBy=`menuindex ASC` ]]


      child-Section-Content:
      [+pagetitle+]<br/>
      [+content+]
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 30912
        • 463 Posts
        OMG, Bruno you deserve a cookie!

        Thank you very very much!