Use links to create pages with Scaffolding live templates
Scenario
You may want to guide users in creating content in Confluence by providing a one-click link to create a page with a structured layout:
When used with Scaffolding Forms & Templates for the Confluence Data Center, automatically creates a page with the Live Template macro.
Automatically suggest a page title
Automatically categorize a page under a parent page
Automatically add labels to the page
If you don't have Scaffolding, check out Using Links to Create Pages from Confluence Templates.
Result
Recipe
Apps |
Linking for Confluence, Scaffolding Forms & Templates for Confluence
|
|---|---|
Platform | Server and Data Center |
Level | Easy |
Estimated time | 10 minutes |
Macros | Add Page |
Suppliers | N/A |
Storage format
You can copy and paste this code into the Confluence Source Editor:
<h3>Create a Knowledge Base article</h3>
<hr/>
<p>
<ac:structured-macro ac:macro-id="dbe57d0b-27a5-404c-99d5-c8c875f10c37" ac:name="add-page" ac:schema-version="1">
<ac:parameter ac:name="parent">How To</ac:parameter>
<ac:parameter ac:name="prefix">How-to </ac:parameter>
<ac:parameter ac:name="linkText">Create a new 'How-to' article</ac:parameter>
<ac:parameter ac:name="source">How-to article live template</ac:parameter>
<ac:parameter ac:name="live">true</ac:parameter>
<ac:parameter ac:name="labels">how</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="5f0501a3-5d0a-4661-ab5b-82399335467e" ac:name="add-page" ac:schema-version="1">
<ac:parameter ac:name="parent">Issues and Solutions</ac:parameter>
<ac:parameter ac:name="linkText">Create a new 'Issues and Solutions' article</ac:parameter>
<ac:parameter ac:name="source">KB article live template</ac:parameter>
<ac:parameter ac:name="live">true</ac:parameter>
<ac:parameter ac:name="labels">issues-solutions</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="b2f9529e-a171-4d0e-b955-c48cbe17a9cc" ac:name="add-page" ac:schema-version="1">
<ac:parameter ac:name="parent">Systems</ac:parameter>
<ac:parameter ac:name="linkText">Create a new 'FAQ' article</ac:parameter>
<ac:parameter ac:name="source">FAQ article live template</ac:parameter>
<ac:parameter ac:name="live">true</ac:parameter>
<ac:parameter ac:name="labels">faq</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="9deb358a-9f9e-4dc9-b1b0-851bd247ff2f" ac:name="add-page" ac:schema-version="1">
<ac:parameter ac:name="parent">Systems</ac:parameter>
<ac:parameter ac:name="linkText">Create a new 'Systems' article</ac:parameter>
<ac:parameter ac:name="source">Systems article live template</ac:parameter>
<ac:parameter ac:name="live">true</ac:parameter>
<ac:parameter ac:name="labels">systems</ac:parameter>
</ac:structured-macro>
</p>
Macro structure
You can recreate the example in the editor view:
Steps
Create an Add Page macro.
For the parameter Create Link Text, enter the link title, for example,
Create a new 'How-to' article. 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:
The Source parameter determines the name of the live template to use. For example,
How-to article live template.Source type is set to template since it is based on a template.
Select the Live Template check box so that the page to be created will always be updated when the live template is updated.
For the Prefix parameter, enter
How-to", so all page titles will start with How to <do something>.To ensure an organized space, use the Parent parameter, which defines where Linking to create the page.
Enter
howfor the Labels parameter to automatically add this label to the pages.