Open paaljoachim opened 2 years ago
It's important to note that only custom templates can be duplicated. It should not be possible to duplicate primary templates (index, single, archive, search, etc).
@jameskoster user should be able to duplicate, let's say single.html
and use it as a base for Page. But this would require extra steps.
We can start with custom templates and progressively enhance the duplication feature.
We need to be careful with providing a duplication UI for primary templates because in this case duplication should only occur as part of the new template creation flow, never as a discrete action. We shouldn't make it possible for folks to create multiple index templates for instance. Perhaps the duplication element doesn't need to be surfaced to the user at all..?
user should be able to duplicate, let's say single.html and use it as a base for Page. But this would require extra steps.
For that particular example I think the flow should focus around adding a "Page" template from the "Add new" menu, and the duplication of single
should take place automatically in the background.
Let's go with:
We can start with custom templates and progressively enhance the duplication feature.
Hallo! I agree that it makes sense to start with custom templates. :) This was a little mockup I made a couple days ago in a duplicate issue:
The idea I had is that clicking on the duplicate option, pops open the same dialog we get now when we make a new template, letting us choose a name and the template the customizations should be assigned to.
Core functions of any template/preset management in any software:
Looked for the "duplicate" functionality in the more dropdown of the template name that I wanted to duplicate, exactly as proposed!
Here's the current experience as of 6.6.1 with GB 19.1 installed. Right now, we have the option to duplicate with pages, template part, and patterns but not with templates due to this work https://github.com/WordPress/gutenberg/pull/63032 This led to larger questions around duplicating in general: https://github.com/WordPress/gutenberg/issues/61083
https://github.com/user-attachments/assets/b3b02df0-a2ce-4627-be84-f04778d73e0a
Duplicating templates, as noted above, should start with custom templates only before figuring out a proper UX.
Agreed, let's start with duplicating custom templates.
The following is based on testing the PR Gutenberg Build from this PR: https://github.com/WordPress/gutenberg/pull/36379#issuecomment-973432382
What problem does this address?
It would be helpful to add a duplicate template into the 3 dot menu.
What is your proposed solution?
Adding a duplicate option.