t_bergman Posted April 9, 2015 Report Posted April 9, 2015 Is there a way to sort the pages by name instead of their ID number? Quote
Administrators simpilot Posted April 10, 2015 Administrators Report Posted April 10, 2015 Untested but try -> /core/common/SiteData.class.php public static function GetAllPages($onlyenabled = false, $loggedin = false) { $sql = "SELECT * FROM " . TABLE_PREFIX . "pages"; if ($onlyenabled == true) { $sql .= ' WHERE enabled=1'; if ($loggedin == false) { $sql .= ' AND public=1'; } } return DB::get_results($sql); } to public static function GetAllPages($onlyenabled = false, $loggedin = false) { $sql = "SELECT * FROM " . TABLE_PREFIX . "pages"; if ($onlyenabled == true) { $sql .= ' WHERE enabled=1'; if ($loggedin == false) { $sql .= ' AND public=1'; } } $sql .= ' ORDER BY pagename ASC'; return DB::get_results($sql); } Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.