Tips & Tutorials

Joomla Tips & Tutorials

Joomla 4 already spreading its popularity with its new features like new user interface, new media manager and many more, There are still some features that look hidden at beginner user level. In this blog post, we will discuss one of an important feature in Joomla to create an override for Joomla modules, component and layouts through Joomla back-end panel.

Override Joomla Contact in Joomla 4

Override Joomla Contact in Joomla 4

When a new user starts learning Joomla and developing his Joomla site, he/she may need to customise the site layout as per their own expectations and this requires access for Joomla template files to edit, modify and override them, It need FTP to access the files that become a little hard for someone who just started learn Joomla and has not much tech skills to create FTP accounts on server and using it to create/move the files.

Why we should override but not customize the modules, components, layout directly?

The reason is UPGRADE. If you do customization directly to modules, components, layouts, they will be all gone when you do upgrade for Joomla core and the extensions. By using the override, the changes will not be affected when you do upgrade.

Step by step instructions to create override for modules, component & layout

This feature was firstly introduced in Joomla 3 and it is maintained in Joomla 4. In this blog post, we will do the tutorial based on the new Joomla 4 front-end template: Cassiopeia, for other templates, the instruction would be valid.

Go to Extensions > Templates > templates > Cassiopeia Details and Files
override content in Joomla 4

Joomla 4 Overrides

Click on Create overrides will give options :

  • Joomla modules
  • Joomla components
  • Joomla layouts
Create Overrides In via Joomla 4 admin

Create Overrides In via Joomla 4 admin

(i). To create an override for Joomla login module, Click on mod_login under the module heading and it will create login module override in the template /html folder

Joomla login module Override in Joomla 4

Joomla login module Override in Joomla 4

(ii). In the same way, we can create an override for the Joomla components that are installed on your website. In case you have 3rd party components installed on site, you will see the option for these components too.

Example: Override Joomla Contact

Components > com_contact > click on it will create override, If you want to create override only for Joomla contact category click on components > com_contact > category.

Override Joomla Contact in Joomla 4

Override Joomla Contact in Joomla 4

(iii). Joomla layouts: Like we created an override for Joomla modules and component, using this method we can create an override for Joomla layouts as well. This is the easy and fast method to create an override in Joomla 3 and Joomla 4 without accessing any other tools. Joomla also gives the option to edit the template files from Joomla Editor.

(iv). File Editing: Joomla also gives the option to edit the template files from Joomla Editor.You can open the files and edit the changes directly using the Joomla editor.

template file editing in Joomla 4

template file editing in Joomla 4

To know about Joomla 4 features have a look at these posts: