Quantcast
Channel:
Viewing all articles
Browse latest Browse all 4235

Re: Only one level being returned for Sitetree

$
0
0

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


Viewing all articles
Browse latest Browse all 4235

Trending Articles