# 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.&#x20;

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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.norrnext.com/norrcompetition/customisation/template-overriding.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
