t_bergman Posted April 9, 2015 Report Share Posted April 9, 2015 Is there a way to sort the pages by name instead of their ID number? Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted April 10, 2015 Administrators Report Share 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 Link to comment Share on other sites More sharing options...
t_bergman Posted April 11, 2015 Author Report Share Posted April 11, 2015 Worked perfectly, thanks! Quote Link to comment Share on other sites More sharing options...
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.