How to create a button to add a new section with editable template content?
Asked by Nicolas Iversen:

I want to enable people to add a new section to the page with editable template content, so that they don't have to copy paste, but only fill in the "blanks" of the template.

Currently, I've only been able to create a new page using a button, or to insert non-editable template content into the page (e.g. excerpt), none of which fit me needs.

Is it possible to have a section with editable template content inserted into the page using a button or to create a new section manually and then have Confluence expand e.g. {my_template} to editable content within the page?


Answers:
author: EPS Software Engineering AG
body: Hi [@Nicolas Iversen](/t5/user/viewprofilepage/user-id/3428160)

We planed to add this feature to our Page Tree Creator. And that's for the end of Q3/2019.

You can find the [Page Tree Creator](https://marketplace.atlassian.com/apps/1214062/page-tree-creator-blueprint-creator?hosting=server&tab=overview) on the Marketplace.

Regards,  
Stephan (CEO of EPS Software Engineering AG, the vendor of the Page Tree Creator)


author: Laura Campbell _Seibert Media_
body: Have you tried the macro Create from Template? <https://confluence.atlassian.com/doc/create-from-template-macro-317196995.html>

I haven't tried it out yet, but you will probably need to first create the templates and make sure they are available in your space. Then you can create your macro and choose from among the pre-defined templates.

Here is the tutorial on how to create a template: <https://confluence.atlassian.com/conf614/create-a-template-965545524.html>

comments: author: Bill Bailey
body: If I understand correctly, that button is basically a shortcut to create a *new* page based on a template. What [@Nicolas Iversen](/t5/user/viewprofilepage/user-id/3428160) wants to do is create a new section in an open page, based on a template.


author: Laura Campbell _Seibert Media_
body: Ah right, my mistake.


author: Nicolas Iversen
body: Thank you! So, are you suggestion that people copy-paste the template section and edit it? I can't have a separate page for the section content and then include that page on a per-need basis in my main page with the included sections content editable?

It would be nice to have a "macro" to write e.g. {section_template} in the main page, and have Confluence expand {...} to the actual content of the section_template page (some other page in Confluence). That isn't possible, right?

comments: author: Bill Bailey
body: I am suggesting that if you have 10 possible sections, place them all in the template. Then users can easily delete what they don't need. Having each in section means users only need a few seconds to delete with the delete section button.

On the last part, not sure I understand what you are asking. Confluence does support transclusion of content, where you can pull in the content of an excerpt or an entire page. But that content is not a copy, and therefor not editable.

What I think you are wanting is button that actually writes text to the page that can be edited. And that type of functionality would have to be a part of a plugin, that calls Javascript.

BTW, I don't know of any plugin that does something similar.


author: Bill Bailey
body: Possible, yes, Easy, no. You would have to develop a plugin to place a button on the editor ribbon, probably with associated javascript to add the section and your template text/items.

It may be easier to just have all the sections in your original template, and ask users to delete what they don't need.


Tags: confluence-server

server