/
Part 2 - Adding a Create Survey link

Part 2 - Adding a Create Survey link

Overview

To allow users to create surveys, we will make use of the Add Page macro to add a Create Survey link.

By the end of this section you will have something that looks like this:

Source code

The following source code is shared using Confluence Storage Format - the XHTML-based format that Confluence uses to store the content of pages, page templates, blueprints, blog posts and comments.

For more information on how to use this source code on your Confluence, read the following article - How do I use Recipes that use the Storage Format with the Confluence Source Editor?

<p> <ac:structured-macro ac:macro-id="8fde47ff-350e-44c0-b87a-a34dd9a9eeb8" ac:name="add-page" ac:schema-version="1"> <ac:parameter ac:name="name">Survey %child-counter:next &gt; number:000%</ac:parameter> <ac:parameter ac:name="linkText">Create Survey</ac:parameter> <ac:parameter ac:name="source">Survey</ac:parameter> <ac:parameter ac:name="live">true</ac:parameter> </ac:structured-macro> </p>

Steps

On the draft page

  • create an Add Page macro

    • set the Name parameter to "Survey %child-counter:next > number:000%"

    • set the Link Text parameter to "Create Survey"

    • set the Source parameter to the "Survey" template you created in Part 1

    • check the Live Template parameter

The Name parameter value of Survey %child-counter:next > number:000% creates pages with a sequential number.

Macro structure

Next

Part 3 - Building the Admin dashboard

Related content

Part 1 - Creating a survey template
Part 1 - Creating a survey template
More like this
Using Add page via form macro to create pages containing Live Templates
Using Add page via form macro to create pages containing Live Templates
More like this
Creating a survey system in Confluence
Creating a survey system in Confluence
More like this
Using Add page macro to create pages containing Live Templates
Using Add page macro to create pages containing Live Templates
More like this
SP - Creating a survey
SP - Creating a survey
More like this
Using Links to Create Pages from Live Templates
Using Links to Create Pages from Live Templates
More like this