No Code Attached Yet
avatar brianteeman
brianteeman
5 Dec 2021

With the introduction of child templates by @dgrammatiko it is no longer possible to duplicate a template :(
The create duplicate button has been replaced by a child template button

Before

image

After

image

avatar brianteeman brianteeman - open - 5 Dec 2021
avatar joomla-cms-bot joomla-cms-bot - change - 5 Dec 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 5 Dec 2021
avatar dgrammatiko
dgrammatiko - comment - 5 Dec 2021

The create duplicate button has been replaced by a child template button

It's still there for templates that don't support children. For the templates implementing the new mode this is not needed, I mean forking any extension shouldn't be a click of a button (but that's just me)

avatar bembelimen
bembelimen - comment - 6 Dec 2021

I agree on the parent template, but probably copying a child template would be a nice addition.

  • The buttons in the forking modal has to be renamed (like "Create" instead of "Child Template")
avatar dgrammatiko
dgrammatiko - comment - 6 Dec 2021

I agree on the parent template, but probably copying a child template would be a nice addition.

What I'm missing is a way to apply a specific style from the parent (or a child [debatable?]) when a new child is created (now it starts with the vanilla style of the parent). That would speed up things for the users that need to replicate spawn children with some minor changes. Also should be quite easy to implement without any major hacks (get the list of the style rows, render it into a select tag, and after successful installation apply the style params to the new template. 5mins work [just kidding it's not 5mins...] )

avatar bembelimen
bembelimen - comment - 6 Dec 2021

[...] 5mins work [just kidding it's not 5mins...] )

Sounds interesteing....I'm also ok with 6 minutes...

avatar brianteeman
brianteeman - comment - 6 Dec 2021

I can think of several scenarios whereby you would want to duplicate a template and not create a dependent child

avatar dgrammatiko
dgrammatiko - comment - 6 Dec 2021

I can think of several scenarios

I might be awfully wrong here but I think that with child templates (Joomla needs a better name for this, the term is not even correct English). Could you briefly describe these scenarios?

avatar brianteeman
brianteeman - comment - 6 Dec 2021

Sample Scenario

As an agency I have a generic template that I use as a base template for all clients that contains lots and lots of layouts etc. I install that template and then copy the template and customise it for the specific site. I keep the base template installed during development so that I can easily revert changes etc. Once the site is live I can then delete the generic base template and just leave the client specific version. If I update the base template to support child (dependent) templates this would not be possible.

avatar brianteeman
brianteeman - comment - 6 Dec 2021

Question?

Can you install a template with child templates in one step?

avatar dgrammatiko
dgrammatiko - comment - 6 Dec 2021

Can you install a template with child templates in one step?

Yes but you have to create a package (basically an XML file and all the zips)

avatar dgrammatiko
dgrammatiko - comment - 6 Dec 2021

If I update the base template to support child (dependent) templates this would not be possible.

Yes that workflow is not possible anymore but I might have a better proposal for this or similar cases.

avatar wilsonge
wilsonge - comment - 6 Jan 2022

Worth noting whilst not directly related to this issue it comes from a similar'ish background. The Duplicate template functionality has been the blocker to us being able to add core support for namespacing templates with 4.0 (e.g. #30816 here we also hide the modal if the template is namespaced - because we'd end up with duplicate namespaces being autoloaded).

avatar brianteeman brianteeman - change - 1 Feb 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-02-01 23:14:22
Closed_By brianteeman
avatar brianteeman brianteeman - close - 1 Feb 2022

Add a Comment

Login with GitHub to post a comment