We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19479
    • 5 Posts
    I am trying to get the one level children using getDocumentChildren. It displays all the children but it also shows all the children’s children. I just want one level.

    <?php
    $childs = $modx->getDocumentChildren(114);
    foreach($childs as $row){
    echo ’<li><a href="[~’.$row[’id’].’~]">’.$row[’pagetitle’].’</a></li>’;
    }
    ?>
      • 32982
      • 674 Posts
      Hi mikelbring

      This only return the first level childs of 114

      ¿is the correct parent (114)?

      By
        Jabiertxof (formerly XYZVISUAL)
        My bussines: http://marker.es
        https://www.youtube.com/user/jabiertxof/videos