How to Create Template Overrides in Joomla 3

How to Create Template Overrides in Joomla 3

Joomla Template Overrides are used to allow the developers to make changes to the layout of a module or component without having to hack into the Joomla core of the module code.

Joomla Template overrides are duplicates of the default.php file from a Joomla module. In our case we just taken mod_login has been duplicated and added to the required folder to allow you to perform a template override. 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 you need is:

TEMPLATE_NAME/html/EXTENSION_NAME/VIEW_NAME/FILE_NAME.php

(Ex: /joomla_directory/templates/Acrostia/html/)

Joomla Component Overrides

If you want to change the way that the 'Article' view displays a com_content article, then you should copy the file at :

JOOMLA_DIRECTORY_PATH/components/com_content/views/article/tmpl/default.php
to
TEMPLATE_NAME/html/com_content/article/default.php

Joomla Module Overrides

Similarly, if you want to change how the 'mod_login' Module is displayed in site, then you should copy the file at :

JOOMLA_DIRECTORY_PATH/modules/mod_login/tmpl/default.php
to
TEMPLATE_NAME/html/mod_login/default.php

We hope this tutorial will helpful :)