public function getFirstChild($sortColumn = 'cDisplayOrder asc', $excludeSystemPages = false)
    {
        if ($excludeSystemPages) {
            $systemPages = ' and cIsSystemPage = 0';
        } else {
            $systemPages = '';
        }

        $db = Database::connection();
        $cID = $db->fetchColumn('select Pages.cID from Pages inner join CollectionVersions on Pages.cID = CollectionVersions.cID where cvIsApproved = 1 and cParentID = ? '.$systemPages." order by {$sortColumn}", array($this->cID));
        if ($cID > 1) {
            return static::getByID($cID, 'ACTIVE');
        }

        return false;
    }
public function getFirstChild($sortColumn = 'cDisplayOrder asc', $excludeSystemPages = false)
    {
        if ($excludeSystemPages) {
            $systemPages = ' and cIsSystemPage = 0';
        } else {
            $systemPages = '';
        }

        $db = Database::connection();
        $cID = $db->fetchColumn('select Pages.cID from Pages inner join CollectionVersions on Pages.cID = CollectionVersions.cID where cvIsApproved = 1 and cParentID = ? '.$systemPages." order by {$sortColumn}", array($this->cID));
        if ($cID > 1) {
            return static::getByID($cID, 'ACTIVE');
        }

        return false;
    }
public function getFirstChild ( $ sortColumn = 'cDisplayOrder asc' , $ excludeSystemPages = false ) { if ( $ excludeSystemPages ) { $ systemPages = ' and cIsSystemPage = 0' ; } else { $ systemPages = '' ; } $ db = Database :: connection ( ) ; $ cID = $ db -> fetchColumn ( 'select Pages.cID from Pages inner join CollectionVersions on Pages.cID = CollectionVersions.cID where cvIsApproved = 1 and cParentID = ? ' . $ systemPages . " order by {$sortColumn}" , array ( $ this -> cID ) ) ; if ( $ cID > 1 ) { return static :: getByID ( $ cID , 'ACTIVE' ) ; } return false ; }
Returns the first child of the current page, or null if there is no child.

@param string $sortColumn

@return Page
Returns the first child of the current page or null if there is no child .