Joomla is a popular open-source
content management system with a lot of possibilities. Joomla has a vast number of themes and extensions available, both free and commercial which is also one of its biggest strengths. It includes a built in editor that you can use to edit the files within your templates or themes. Read through to know how to modify a Joomla theme.
Templates are just a group of HTML, PHP, XML and image files which are stored in the templates directory of your site. You can modify these files by using Template Manager or you can also modify these directly. The template editor does not pack many features, but using the editor will make the task easy, if you need to make a quick change to a template.
There are many good reasons to modify the default template. People might like the structure but want to give the website a new design. They might already have brand colours or a logo or a complete Photoshop mock-up created by them or another designer. Some of them may want to
recreate an existing website in Joomla, keeping the elements and design the same. Below are the steps to modify a Joomla theme.
- Login to your Joomla administration
- Move over Extensions in the top menu and then click Extension Manager
- Then click on the Templates tab
- Choose the template you want to edit in the list of templates which you see and then click Details and Files link next to it.
- Click the file which you want to edit from the list of files either under Stylesheets or Template Master Files. If you want to edit the css of a site, you will most likely find the files under Stylesheets and if you want to edit the php files the files will be found under the Template Master Files.
- Then click the filename. After clicking the filename, you will come to another page that will load the file into an editor. You can make any changes if you want and then click Save in the top menu.
You should make a copy of the template before starting, if you want to be able to roll back any changes. In this way, you will be able to go back to the original and copy the code there if you mess up. Also, you might overwrite your modifications without a copy, if you use the default folder and at some point upgrade your Joomla installation. You will now have two copies of the template on your Joomla website. You will have to edit the template XML file to name the copied template to something else. Template overrides override the output of Joomla’s core modules and components, without requiring you to hack the core. This will allow you to override the output of the content component that shows the content of the website. Your overrides are left untouched when the Joomla core is updated. The files might be overridden by a future Joomla update, if you modify the same files in the core. Template overrides can also be used for installed modules and components.