Using Add page via form macro to create pages containing Live Templates
Scenario
You might want to guide Confluence users in creating content by providing one-click links to create pages with a structured layout. These auto-generated pages can:
When used with Scaffolding Forms & Templates for Confluence Cloud, automatically create a page based on a Live Template.
Automatically categorize a page under a parent page
Automatically add labels to the page
Result
Recipe
Apps |
Linking for Confluence Cloud, Scaffolding Forms & Templates for Confluence Cloud
|
---|---|
Platform | Cloud |
Level | Easy |
Estimated time | 5 minutes ⏱ |
Macros | Add Page via Form |
Storage format
You can copy and paste this code into the Confluence Source Editor:
N/A
Macro structure
You can recreate the example in the editor view:
Steps
In the page, create an Add Page via Form macro.
For the Button Text parameter, enter text for the button link e.g. "Add project tracker page". Users will see this text when viewing the link on the page.
To decide what will happen when a user clicks on the link, specify the source parameters:
Source type is set to "page" since it is based on a Confluence page.
Source parameter determines the name of the Confluence page to use. E.g. "Page with Live Template".
Tick the Live Template checkbox.
To ensure an organized space, make use of the Parent parameter, which tells Linking where to create the page. This is useful for automatically categorizing the pages. Leaving at default, will make the current page you are adding the macro the parent page. For this example, we are using "Project Catalogue".
You can also automatically add label(s) to the pages. For this example, we specify "project-key" in the Labels parameter.
Click on the cross button or click on the page to save the changes. Repeat the previous steps as needed, then Publish the page.
Make sure the Source page being used has the Scaffolding Live Template included within.
Line-by-Line Explanation
N/A