When to use a Joomla child template (and how to set it up)

Child templates keep your Joomla customisations safe across template updates. Here is when to create one, when a style or override is enough, and how to set it up.

Creative portfolio Joomla 6 template preview

Every Joomla site eventually needs a change the template did not ship: an extra module position, a different article layout, a colour that is not in the options. Editing the template directly works until the next update replaces the file you changed. A child template is the supported way to keep those changes without freezing the parent.

This guide explains what a child template is, when a template style or a single override is the better tool, and how to create one in the administrator.

What a child template actually does

A child template is a template that inherits its parent’s files. It needs one file of its own, templateDetails.xml, and everything else — PHP, CSS, JavaScript, images and language files — comes from the parent. Joomla uses a file in the child when one exists and falls back to the parent for everything else.

Two elements in templateDetails.xml define the relationship. The parent declares that it accepts children with <inheritable>1</inheritable>. The child declares <inheritable>0</inheritable> and names its parent:

<inheritable>0</inheritable>
<parent>cassiopeia</parent>

Both elements sit inside the template’s <extension> element, and the child’s folder sits next to the parent’s under templates/. Child templates arrived in Joomla 4.1 in February 2022 and are part of the core template system in Joomla 5 and 6. Joomla 6 also ships Cassiopeia Extended, a core child of Cassiopeia with colour and font settings — a working example of the pattern you can inspect in the administrator.

When a child template is the right choice

Use a child when you need to change files, not just settings:

  • You need to edit the template’s own code. Changes to index.php, its CSS or its JavaScript go in the child, so a parent update does not overwrite them.
  • You need two variations of one design. A campaign landing page with a stripped header can live in one child while the rest of the site keeps the full layout. Each child has its own style and menu assignment, and there is no limit on how many you create.
  • You want overrides kept out of the parent. Component and module overrides live in an html folder. Putting them in a child keeps them separate from files the template developer ships.
  • You hand the site to a client. Customisations in one folder are easier to document, review and remove than edits scattered through a vendor template.

When a style or a single override is enough

What you want to changeUse
Colours, fonts or layout switches exposed in the template optionsA template style
The markup of one module or component viewA template override
The template’s own index.php, CSS or JavaScriptA child template
A quick CSS tweakThe template’s custom CSS file or field

A style is configuration; a child is code. Duplicating a style gives you a second set of options without touching files, and you can assign it to specific menu items. If the template exposes the setting you need, that is almost always the cheaper route: nothing to maintain and nothing to review after an update.

An override changes the output of an extension, not the template itself. If you only need to change how a menu module renders, an override is the correct tool. Place it in a child template when you want it isolated from the parent.

How to create one in the administrator

  1. Back up the site. Template work is file work, and a backup makes the experiment reversible.
  2. Go to System → Templates panel → Site Templates.
  3. Open the parent template’s Details and Files screen, for example Cassiopeia Details and Files.
  4. Press Create Child Template.
  5. Give the child a name, leave Additional Template Styles empty unless you need more than the default style, and confirm with Create Child Template.
  6. Close the parent, then open the new child in the template list.
  7. Open the child’s template style, check its options, and use the Menu Assignment tab to choose where it applies.
  8. Make it the default style only when you are ready for the whole site to use it.

If there is no Create Child Template button, the template does not declare itself inheritable. You can add the flag to the parent’s templateDetails.xml, but that edits a file the template developer controls, and an update may undo it. Ask the developer for a child-compatible release first.

A child is only a folder with its own templateDetails.xml, so you can also build one by hand if you need to package it for another site. For day-to-day work, the administrator route is less error-prone.

If you are installing the template for the first time, our quickstart guide explains when to use the full demo package and when a plain template install is the better start.

Put your changes in the child, not the parent

Once the child exists, treat the parent as read-only:

  • Create overrides from the child. Open the child’s Details and Files screen, use the Create Overrides tab, and Joomla copies the extension’s layout into the child’s html folder. Edit that copy, never the original extension file.
  • Delete overrides you do not change. A copied file that stays identical to the original hides future improvements and makes the child harder to audit.
  • Keep custom CSS in the child. Use the template’s custom CSS field or a stylesheet loaded by the child rather than editing the parent’s CSS files.
  • Write down what you added. A short list of overridden files and the reason for each one saves hours when the site changes hands.

Keep it maintainable across updates

A child template protects your changes from being overwritten, but it does not make them maintenance-free:

  • Test parent template updates on a staging copy before the live site.
  • After an update, open the pages that use your overrides and compare them with the new parent markup. If the structure changed, update the override.
  • Remember that a child is tied to its parent. If you later switch to a different template, the child does not come with you, and the overrides will need rework.
  • Keep the parent’s update channel active. A child lets you customise safely; it is not a reason to pin an old template version.

A simple decision rule

Change options, not files: use a template style. Change one extension’s markup: use an override, ideally in a child. Change the template itself: use a child. If the template cannot have children, treat that as a maintenance warning rather than an invitation to edit files in place.

Before you open a code editor, check what the design already offers. Browse the template previews and compare the demo’s layouts with your requirements. A portfolio design such as Creative ships creative portfolio layouts and inner pages, and much of what looks like a code change may be a style setting. If you are still choosing a design, the portfolio category is the place to compare the options.

Child templates are not glamorous, but they turn a one-off hack into something you can update. Create one before your first file change, not after the second update undoes it.

Sources and references

Some links on this page are affiliate links. If you buy through them we may earn a commission at no extra cost to you — see our disclosure.

Mentioned in this guide

Templates worth a closer look

Preview screenshots, features and pricing before you open the marketplace.

All template previews
Keep reading

More from the blog

Short, practical guides published twice a week.

All guides
Put it into practice

Pick a template with a usable quickstart.

Demo content, documentation and a one-click install make the first day of a project much shorter.

Opens templatemonster.com · no extra cost to you