Support

Documentation

Module view template overrides

Our module's output is generated by view template files, like our component's. Just like a component, the module's view template files are stored in the tmpl directory of the module itself.

Keep in mind that there are two kinds of modules: site and administrator. Site modules' view templates can only be overridden in site templates. Administrator modules' view templates can only be overridden in administrator templates. If you copy an administrator module's view templates in a site template's html folder to override them nothing will happen. This is not a bug; you asked Joomla to do something that does not make sense if you think about it. We explicitly mention that because it's something that less experienced site integrators fall for the first time they try to do template overrides.

In any case, Joomla offers two ways to do module view template overrides.

Using the Joomla Template Manager

This method is discussed in the Joomla documentation.

For frontend modules: go to System, Templates, Site Templates. For backend modules: go to System, Templates, Administrator Templates.

Click on the Create Overrides tab.

From the Modules area click on the module you want to override view templates for.

Back to the Editor tab, navigate to html then mod_something, where mod_something is the name of the module you selected in the previous step. You can see all the files Joomla copied over from our component and you can edit them.

These are your own copy of our view template files, living inside your site's template. You can modify them freely without fear of breaking ATS. If you mess up you can delete these files (or the entire subfolder) and start over.

Copying files manually

The Joomla template manager doesn't perform any magic; it simply copies over files. You can copy the files manually and edit them in a programmer's text editor (e.g. Notepad++ on Windows, gEdit or Kate on Linux, or BBEdit on macOS) or a full blown IDE such as Visual Studio Code, NetBeans, Eclipse, phpStorm etc.

You will only need to know where your site's template lives inside your site's filesystem. All site templates live under the templates folder in your site's root and all administrator templates live under the administrator/templates folder under your site's root. Inspect the subfolders there to find out which one has your template. In this documentation we will call that subfolder MY_TEMPLATE.

Go to the folder modules/mod_something (frontend modules) or administrator/modules/mod_something (backend modules) where mod_something is the module you want to override view templates for. Find the tmpl folder and which file(s) you want to override. Yes, that's right, you DO NOT need to copy all .php files if there are more than one; you only need to copy the ones you actually want to override.

Let's say that you want to override the frontend module file modules/mod_atstickets/tmpl/default.php.

  1. Create the subfolder templates/MY_TEMPLATE/html/mod_atstickets You may have to create parent folders to get there.

  2. Copy the file modules/mod_atstickets/tmpl/default.php to templates/MY_TEMPLATE/html/mod_atstickets/default.php

You can now edit the file in templates/MY_TEMPLATE/html/mod_atstickets and customise it as you wish. It will be used INSTEAD OF the file we provide with ATS.

Let's say that you want to override the backend module file administrator/modules/mod_atsstats/tmpl/default.php.

  1. Create the subfolder administrator/templates/MY_TEMPLATE/html/mod_atsstats You may have to create parent folders to get there.

  2. Copy the file administrator/modules/mod_atsstats/tmpl/default.php to administrator/templates/MY_TEMPLATE/html/mod_atsstats/default.php

You can now edit the file in administrator/templates/MY_TEMPLATE/html/mod_atsstats and customise it as you wish. It will be used INSTEAD OF the file we provide with ATS. Even if you are using the default Joomla administrator template (Atum) this file will NOT be overwritten when you update Joomla; it's not part of Joomla's distribution.