DATmedia Posted June 20, 2023 Share Posted June 20, 2023 (edited) Hi, if you want to sort your tlds on domain page alphabetically you could add the following php function to "/templates/website/your-template/domain.php". Search for the line (in modern theme it is line 766) <?php if(isset($tldList) && is_array($tldList) && sizeof($tldList)){ foreach($tldList AS $row){ and add before the foreach this line: usort($tldList, function($a, $b) { return strcmp($a['name'], $b['name']); }); So it looks like: <?php if(isset($tldList) && is_array($tldList) && sizeof($tldList)){ usort($tldList, function($a, $b) { return strcmp($a['name'], $b['name']); }); foreach($tldList AS $row){ Voila, your array $tldList will be sorted alphabetically. Regards Philipp Edited June 20, 2023 by DATmedia 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.