Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Edit content

Scenario

You might want to guide users in creating content in Confluence

...

by providing a one-click link to create a page with a structured layout

...

:

...

  • creates a page based on a Live Template.

  • 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 Server, Scaffolding Forms & Templates for Confluence Server and Data Center

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:

Code Block
<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

  1. Create an Add Page macro.

  2. For the parameter Create Link Text, enter the link title

...

  1. , e.g., "Create a new 'How-to' article". Users will see this text when viewing the link on the page.

  2. To decide what will happen when a user clicks on the link, specify the source parameters:

    1. Source parameter determines the name of the Live Template to use. E.g., "How-to article live template".

    2. Source type is set to "template" since it is based on a Live Template.

    3. Check the Live Template parameter

...

    1. so that the page to be created will always be updated when the Live Template is updated.

  1. Expand

...

  1. the Configure page title prefix/

...

  1. postfix and use the Prefix and Postfix parameters. In this example, we add "How-to " as a Prefix, so all page titles will start with "How to (do something)".

  2. To ensure organized space,

...

  1. use

...

  1. the Parent parameter, which tells Linking where to create the page.

...

  1. We specify "how" for

...

  1. the Labels parameter to automatically add labels to the pages.