The answers on previous threads are no longer valid.
I want to copy an existing user-created template so that I can modify it.
Hi, @Allison Kelsey.
Unfortunately, there is no easy way to duplicate or copy a template with Confluence. There's a long-standing enhancement request for it, but no progress on it yet.
The clunky workaround is to copy/paste from a template into a new custom template that you create.
You may also want to have a look at some of the templating apps for Confluence on the Atlassian Marketplace. I believe some of these offer this capability.
Best,
-dave
P.S. you may want to add your vote to the enhancement request
Hello @Allison Kelsey ,
You can try to use Confluence Java API to do this:
import com.atlassian.confluence.pages.templates.PageTemplate;
import com.atlassian.confluence.pages.templates.PageTemplateManager;
PageTemplate originalTemplate = pageTemplateManager.getPageTemplate(TEMPLATE_ID_HERE);
PageTemplate newTemplate = new PageTemplate()
newTemplate.setCOntent(originalTemplate.getContent())
newTemplate.setName(originalTemplate.getName())
newTemplate.setVersion(1);
...
pageTemplateManager.savePageTemplate(newTemplate, originalTemplate);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.