Summary / motivation
Currently the help file says that it is possible to override the theme of a location for a country by using theme_location_* and putting it in the right country file in /supported/.
One example of this is for German addresses, where a custom template has been defined in /supported/location.de.inc, theme_location_de(...
This does not feel like the best approach for customising the template. For example, the German address layout is already out of date compared to the default location.tpl.php (missing schema information, email, phone, etc.)
Is this still the correct approach? We are looking to implement a small change to correct the way British addresses are displayed; but it doesn't seem as consistent and easy to maintain to override the template using theme_location_gb .
For now we have just used a custom template in our theme; but I would prefer to commit this code back to the module.
Proposed change
Instead of re-writing the template in a PHP function, use template files, perhaps in the format: location-gb.tpl.php in the /supported/ folder. The existence of a custom country template should be checked before rendering the generic template.
These template files would be easier to keep up to date with changes to the base location.tpl.php since they would be written in the same format.
Comments
Comment #1
jkingsnorth commentedUpdating description with a proposal for more consistent approach.