I want to sort first by 'Sort' ASC then by ''ID' DESC
This code only sorts by ID:
public function nextPager() {
$where = "ParentID = ($this->ParentID + 0) AND Sort > ($this->Sort + 0 )";
$pages = DataObject::get("SiteTree", $where, "Sort", "", 1);
if($pages) {
foreach($pages as $page) {
return $page;
}
}
}