How to get list of sub pages

Permalink
Is there a way to return a list of sub pages connected to a page?

ob7dev
 
hutman replied on at Permalink Best Answer Reply
hutman
You should be able to do something like this

$c = Page::getCurrentPage();
$cParentID = $c->getCollectionID();
$pl = new PageList();
$pl->filterByParentID($cParentID);
$pages = $pl->get();

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.