Template Overriding
Template overriding is a standard feature that comes with Joomla. It's sole purpose is to allow you to customize your layouts without modifying the files and contents of the components or modules that you install on your Joomla site.
NorrCompetition is following the standard approach.
Creating layout overrides
Preparing a template override
Letβs assume that the name of your template is mytemplate
. First of all you need to create a template override.
Create a general override folder called html
in the following path:
/templates/mytemplate/html/
Create NorrCompetiton override folder called com_competition
in the following path:
/templates/mytemplate/html/layouts/com_competition/
This will contain override layouts for NorrCompetition layouts.
Overriding default layouts
Create an override folder in the following path:
/templates/mytemplate/html/layouts/com_competition/default/
If you need to create a layout override for
/components/com_competition/layouts/default/partials/contest/items.php
then you will need to copy that file to the following path:
/templates/mytemplate/html/layouts/com_competition/default/partials/contest/items.php
The same applies to any PHP file inside the layouts/default
folder you want to override.
Creating CSS/JS overrides
Assets of the component are located in the /media/com_competition/
folder.
For example, if you want to override a cropper.min.css
located in the /media/com_competition/css/
then you will need to copy it into the following path:
/templates/mytemplate/css/com_competition/cropper.min.css
or if your template supports child template, then to
/media/templates/site/mytemplate/css/com_competition/cropper.min.css
The same approach applies to JavaScript files override. The only difference is that they are stored under js
folder.
Last updated