- A working Joomla 6 website
- Admin access to Joomla backend
- Basic understanding of HTML
- CSS
- and Joomla template structure
One of Joomla's most powerful—and most underused—features is template overrides. They let you completely reshape how your site looks without ever touching Joomla's core files. That means your customisations survive every update, stay organised, and remain easy to roll back. This guide walks you through everything: what overrides are, when to use them, and exactly how to create and manage them in Joomla 6.
What Are Template Overrides in Joomla 6?
A template override is simply a copy of a Joomla core layout file placed inside your active template's folder. When Joomla renders a page, it checks your template directory first. If it finds a matching file there, it uses your version instead of the original — leaving the core untouched.
| Approach | Update-safe? | Recommended? |
|---|---|---|
| Edit core files directly | ❌ Overwritten on update | ❌ Never |
| Child template | ✅ Yes | ✅ For full theme forks |
| Template overrides | ✅ Yes | ✅ Best for layout tweaks |
When Should You Use Template Overrides?
Overrides are the right tool whenever you want to change how content is presented without changing the underlying data or logic. Common use cases include:
- Changing how a single article or category blog is rendered
- Adding custom HTML structure, wrapper
<div>s, or CSS classes - Removing unwanted elements — like the "Written by" author label
- Inserting custom fields or images at specific positions in a layout
- Adjusting module output HTML to match your CSS framework
How Joomla 6 Override Resolution Works
Each Joomla component stores its view files inside its own directory. For com_content (articles), the core layouts live at:
/components/com_content/tmpl/article/default.php
/components/com_content/tmpl/category/blog.php
/components/com_content/tmpl/featured/default.php
When you create an override, Joomla looks for the equivalent file inside your template:
/templates/your_template/html/com_content/article/default.php
If Joomla finds that file, it loads your version instead of the original — automatically, with no extra configuration needed.
Step 1 — Create an Override via the Admin Panel
Joomla 6 makes it simple to generate overrides from the backend — no manual file copying required.
- Open the Template Manager. Go to System → Site Templates → Templates and click on your active template (e.g. Cassiopeia).
- Switch to the "Create Overrides" tab. You'll see a full list of components, modules, and plugins that can be overridden.
-
Choose the component.
For articles, select
com_content. For modules, find the module name (e.g.mod_articles_latest). -
Select the specific view.
Click the view you want — for example, article or category. Joomla automatically copies the layout files into your template's
/html/folder. -
Done — the override is ready to edit.
Navigate to the Editor tab and open
html/com_content/article/default.phpto start customising.
Step 2 — Edit Your Override File
Once generated, you can open the file directly in Joomla's built-in template editor. The override file contains the same PHP and HTML as the core layout — you now own a safe copy to modify freely.
Common edits you might make to html/com_content/article/default.php:
<?php // Remove "Written by" author line — just delete or comment it out
// $this->item->author is available if you need it elsewhere
?>
<div class="article-body my-custom-class">
<?= $this->item->text; ?>
</div>
Step 3 — Create Alternative Layouts
Need two different designs for the same view? Joomla supports alternative layouts — just add extra files alongside your default override.
/templates/your_template/html/com_content/article/default.php ← standard
/templates/your_template/html/com_content/article/card.php ← card style
/templates/your_template/html/com_content/article/fullwidth.php ← no sidebar
Once created, each alternative layout appears as an option inside the article or menu item settings under Layout or Alternative Layout. This is ideal for landing pages, featured articles, or category-specific designs — all without duplicating code between templates.
Step 4 — Override Module Layouts
The same override system applies to modules. If you want to change how a module renders its HTML — for example, wrapping news items in card-style markup — the process is identical:
-
Go to Create Overrides and find the module (e.g.
mod_articles_latest). -
Joomla copies the layout to
/templates/your_template/html/mod_articles_latest/default.php. - Edit the file — wrap items in custom markup, add classes, or restructure HTML as needed.
-
Create multiple layouts (e.g.
card.php,grid.php) and select them per module instance via Module Settings → Advanced → Layout.
Want a template built for overrides from day one?
JLV Extension templates are designed with clean, well-documented layout files, sensible class naming, and full override compatibility — so your customisations slot in without fighting the base theme.
Explore JLV Templates →Step 5 — View and Manage Existing Overrides
As your site grows, you may accumulate many overrides. Joomla 6 gives you a dedicated view to keep them under control.
- Go to System → Site Templates → Templates → [Your Template].
- Click the Overrides tab — you'll see a list of all existing overrides with their file paths.
- From here you can open, edit, or delete any override directly from the browser.
Bonus Tips for Clean Overrides
- Comment your changes. Add a short comment near every customisation —
<?php // JLV: removed author block ?>— so future-you (and your team) know exactly what was touched. - Stay focused on presentation. Keep PHP logic intact; only change HTML structure, class names, and markup order.
- Use consistent class naming. Prefix custom classes (e.g.
jlv-article-body) so they're easy to target in CSS and won't collide with Joomla's defaults. - Never copy overrides manually unless you know the exact folder structure — always use the admin panel to generate the initial copy.
Troubleshooting: Override Not Loading?
If your override doesn't seem to be taking effect, work through this checklist:
- Check the file path. The folder structure under
/templates/your_template/html/must exactly match the component's directory structure. - Confirm the active template. If a different template style is assigned to that page, it may not use your override folder.
- Clear Joomla's cache. Go to System → Clear Cache and flush both site and admin caches.
- Check for PHP errors. A syntax error in your override file will cause Joomla to silently fall back to the core layout. Enable debug mode (System → Global Configuration → Debug System: Yes) to surface PHP warnings.
- Re-check the file name.
default.phpvsDefault.php— case matters on Linux servers.
Final Checklist Before Going Live
- ✅ Override created via admin panel — file exists in
/templates/your_template/html/ - ✅ HTML structure changes focused on presentation (no core logic removed)
- ✅ Custom changes commented clearly in PHP
- ✅ Alternative layouts named and selectable in article/module settings
- ✅ Overrides listed and accounted for in the Overrides tab
- ✅ Cache cleared after edits
- ✅ Site tested on frontend — layout renders as expected
- ✅ Post-update compatibility check scheduled after next Joomla release
Conclusion
Template overrides are one of the most practical tools Joomla 6 puts in your hands. Once you understand the file-resolution order — template folder first, core second — the whole system clicks into place. You get complete control over HTML structure and presentation, your changes are upgrade-proof, and you never have to worry about losing work when Joomla releases a new version.
Start with a single override — maybe removing the "Written by" text from articles — and build confidence from there. Before long, you'll be creating alternative layouts, overriding module output, and reshaping your site's design without touching a single core file.
Next up in the Newbie Guide: Article Layout Options and Display Settings in Joomla 6 — where you'll learn how to combine overrides with Joomla's built-in display controls for even more flexibility.