How do I create a template override

Template overrides offer tremendous flexibility in terms of content look and feel. Basically you can control any aspect - HTML output and CSS, without affecting the component's update process (changes to the source code would have been lost if an update occurred). As a drawback, this method requires a basic understanding of PHP, HTML and CSS.

This technique consists in duplicating the component's (this works for modules too) view files into the template's HTML folder.

If you are new to Joomla! development, then it is probably easiest to start with an existing view, and try modifying it to achieve the desired result. To do this, you should make a copy of the existing view in the html directory of your template, and then modify the copy. The directory structure would be similar to this:

TEMPLATE_NAME/html/EXTENSION_NAME/VIEW_NAME/FILE_NAME.php

For example, if you wish to change the way com_search (the standard Joomla! searching component) displays the searched results, you will have to:

copy: PATH_TO_JOOMLA/components/com_search/views/search/tmpl/default_results.php


to: /templates/rslens/html/com_search/search/default_results.php


Afterwards you can modify the duplicate to suit your needs.

A more detailed explanation on the Joomla! template override feature can be found here!

Was this article helpful?

Yes No
Sorry about that

You Should Also Read

How do I make CSS overrides for Joomla! components

How to modify RSLens!'s style without changing the source code

How to enable displaying sub-menu items

Changing the background image

How do I change the favicon image