In a former question I've had good advice how to sort titles with sql-query's alphabetically in a correct (human) way, IN CASE titles (or names, documents, articles, ..) all begin with a same word (e.g. Appendix) followed by a number (1, 2, 3,...). When this leads to decimals (Appendix 10 and higher), sorting within Joomla is not correct anymore (Appendix 10 comes after Appendix 1 in stead of after Appendix 9). I'm now trying to integrate the given advice (one of the sql-query's) within the Joomla code. I'm using Component Contacts as a tryout, and trying to modify the file category.php so it will fit my needs. But until now no luck. The specific question is how / where to integrate one of the query's (e.g. $query->order("CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(a.name, ' ', 2), ' ', -1) AS UNSIGNED), a.name");) in category.php in such a way that it gives no conflict with existing code.