In your example $pages will only be the pages for the a single level. If you want to get the children of those
$pages = SiteTree::get()->filter('ParentID', 54);
foreach($pages as $page) {
$page->Children(); //
}
Of course you may want to make that recursive so children of children are included.
Posted to: Only one level being returned for Sitetree | Show Thread | Post Reply