Visual tutorial guide to using the template override mechanism in Joomla
This tutorial guide shows you how to
use the override system in Joomla.
What are Template Overrides in Joomla?
Template overrides are a way of changing the way Joomla shows something without changing the basic or core Joomla system. That's important because it means that as Joomla is upgraded to new versions you will not have to repeat all the changes you made.
How do Template Overrides work in Joomla?
Joomla has a basic system that generates pages for websites as they are needed. Part of the system says how the pages will look - using a template that tells the Joomla core where to put the items that will make up the finished page. You can think of this as a two-stage process:-
- Joomla assembles the information needed to show a web page
- Joomla uses a template to position that information and show it using various fonts etc.
The designers of Joomla have built-in a special override mechanism so that every time Joomla produces a page it looks at the template to see if there are any overrides, if there are it uses them, otherwise it uses the template 'as is'.
This is a very sophisticated and elegantly designed system that adds enormous power to Joomla websites.
How to remove a line from the Joomla footer
This example uses a commercial template called mytemplate that was purchased from Joomlashack - it is a very cost-effective way of using a high-quality template. It comes with a customisation system for layout, menus and colors etc that lets you customise the page easily using a browser and nothing more than cut and paste functions in a text editor.
Prior to overriding part of the template is looks like this . . .

The footer at the bottom of the page contains the copyright notice on one line, followed by 'Joomla is Free Software released under the GNU/GPL License' with two links on the second line.
This tutorial will show you how to use template overrides to remove the second line from the footer.
I purchase Joomla templates from Joomlashack - it's much more cost-effective than writing our own and they work first time! You can visit their website by clicking this image.

Steps to using template overrides in Joomla
- Locate the appropriate module or component in Joomla
- Copy the relevant file that is to be overridden
- Paste the relevant file into the template (the override is now done, but because we copied the original file there will be no difference yet)
- Modify the file to produce the changed page
Working in this way is strongly recommended because you start from a file that you know works correctly. If you then make a small change to it, then check that produces the expected change on the page you can go ahead and make other changes with confidence. Small steps may seem frustratingly slow at first, but there are no fault finding error messages to rely on, if it doesn't work and you have made a lot of changes it's much harder to find the problem.
Which module output is going to be overridden?
In the case of the page footer that's easy, it's the footer module.
Now we have to dive into the site and Joomla files . . . using your favorite ftp program access your Joomla website and look at the files. You should see something like this. . .

Open the modules folder