list chils in sitemap order

Permalink
I have child lists for my site using:

$parent = Page::getByID($parentID);
$pageArray = $parent->getCollectionChildrenArray(true);

But $pageArray is not in sitemap order, How can i achieve this?

zaseki
 
zaseki replied on at Permalink Reply
zaseki
Solved it:

$db = Loader::db();
$r = $db->query("select cID from Pages where cParentID = ? order by cDisplayOrder asc", array($parentID));
while ($row = $r->fetchRow()) {
$pageArray[] = $row['cID'];
}