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

    I’d like to display the number of *all* children and subchildren of a document in the wayfinder-menu, e.g.

    Topic One (10)
    Topic Two (3)

    I managed to find out the number of direct children with
    count($modx->getDocumentChildren($ID, 1, 0,'id'));

    but that omits the grandchildren and so on.

    Is there an easy and elegant solution?
    Thanks!

    Jörg