0

In Joomla 3 there was a handy button to create a copy of template so that you had a basis on which to customise and create your own template.

This seems to have been removed in J5 and instead there is a create child template button which is not at all what I want. I want an entirely separate template to customise which is not linked to a parent.

What is the best way do do this now? (and why on earth was the facility removed - it was really useful) ?

4 Answers 4

0

there is a way to duplicate a template in Joomla 5. - Do the following:

  • go to "System" on backend
  • Click on "Site Template Styles"
  • Check the box beside the Template you want to duplicate
  • If you check the box the Duplicate button becomes available on the top

I hope this helps...

1
  • er, no. That is not what I want. All that does is make a duplicate of the template style settings in the template_styles table in the database. So you can have more than one set of style settings for a given template (default colours etc) for different parts of your site.
    – RogerCO
    Mar 12 at 19:33
0

This is not an answer but a long comment @Gerald

er, no. That is not what I want. All that does is make a duplicate of the template style settings in the template_styles table in the database. So you can have more than one set of style settings for a given template (default colours etc) for different parts of your site.

What I am after is the old J3 facility to create a copy of the actual template files and install it as a fresh template that you can then customise. It was quite handy for creating a copy of a template to modify that wouldn't get overwritten by updates.

The only way to do it now is manually by zipping up the template folder and the template's media folder and copying them to new folders with a new name and manually editing all of the references to the old template name so that the namespacing etc all works and doesn't get confused. Not so simple as it was in J3 which is probably why they couldn't be arsed to include it in J5.

0

Template copying is a old way for users to customize templates without losing changes. It has many issues. For example, it cannot rename PHP classes and language constants. Which eventually leads to conflicts. Furthermore, it's not really optimal because users have to maintain the whole template on their own. That's why it has been superseded by child templates. Although the implementation is poor, it does solve the mentioned issues because no files are copied. Users can override individual files and maintain only them.

Non-inheritable templates can still be copied but for modern templates you'd need to use an extension export extension or copy the files manually by inspecting the contents of templateDetails.xml manifest. Basically how you would copy any other extension.

1
  • Yes, I get that. But the problem with child templates is that subsequent updates to the parent template may interfere with your child one. Really I am using the standard template as a template to create my own, so sorting out any naming issues etc is a one time job after creating the copy, but easier than starting from scratch with a completely blank set of files. Its not a big deal because it is typically something that you only want to do once (and then reuse your derived template across other sites by installing/discovering it in the usual way)
    – RogerCO
    Apr 25 at 10:44
0

In an effort to make maintenance of my sites easier to manage without creating problems for future upgrades, I copy the core template periodically and go through the process of renaming the files and code and then add my enhancements to make the template look, feel and act as I want it. This means when a new major release is dropped (or near dropped), I go through the process. I also keep a bit of an eye on GitHub changes relating to the template.

So for J5 I copied Cassiopeia files:

templates/cassiopeia Folder
media/templates/site/cassiopeia Folder
language/en-GB/tpl_cassiopeia.ini
language/en-GB/tpl_cassiopeia.sys.ini

Don't forget to rename all CSS files as appropriate.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.