To customise the name of a template is quite simple but requires a few more steps than a standard template.

First of all, rename the folder 'joomlapure' to the name you want to call the template.

 

For the template to be installed with a new name you will need to rename the template in the templateDetails.xml file.
Change the name between the <name> tags at the top of the file, this is the name that will be displayed in the extensions manager. You can also edit the description tag here to add any custom information.
The template administration area relies on some custom fields, so there's another field that need to be changed to match the name of your new template. Search for:
<fields name="params" addfieldpath="/templates/joomlapureblog/pure/fields">
and change the name to your newly named template folder.

As it's not easy to get the frontend template in the administrator area I had to hardcode the template name into the file (the frontend template could be any of the installed templates). Open the file /pure/fields/scripts.php and you will see a line defining the template name:
$template = 'joomlapure';
Change the name here to your new template folder name.

That's it, you now have a renamed template.

Advanced Customisation

When development is over you might want to rid the template admin of some fields you don't want your clients to edit. You can do this whilst still having control through the config file.

Each option is saved in the normal way to the database, but it can also be overridden in the config file located at /pure/config.php
There are a couple of options here

  • Comment out the fields from the templateDetails.xml file to hide the inputs from the client after setting up the template (a good idea anyway)
  • Hardcode values into the config file

I would probably go for both, the first to stop clients playing with the options and the second to backup incase of any database problems.

comments powered by Disqus