Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel6
outlinefalse
typeflat
separatorpipe
printablefalse

Overview

For our FAQ article, we will use the repeating-data macro from Scaffolding Forms and text-data macro for form inputs.

Info

The repeating-data macro allows users to duplicate what is nested inside the repeating-data block.  

...

Create the FAQ

In your knowledge base space

  • choose create new template

  • add the repeating data macro

    • name the macro faq

    • set initialRows to 5

In the repeating data macro

  • create a 2 x 2 table

    • set first column as header column

    • add Question to first row header column

    • add Answer to second row header column

...

  •  insert text-data macros into each empty cell of the table

...

Info

The repeating-data block 5 initial rows so that a new copy of this template will render 5 question-answer pairs initially. The tutorial for this template can be found in our technical documentation. 

Image Removed

Using the Live templates feature from Scaffolding Forms, we can create a new page with the live-template block, and render an FAQ article such as this one:Image Removed

...

Panel
titleColor#FFF
titleBGColor#205081
titleThe great thing about Live Templates

Imagine you'd like to modify the FAQ template and you have already created several FAQ pages. It would be a nightmare to have to update all of them individually.

By creating a live-template block on the page, the page renders the structure of a predefined template and displays the data entered by the user via forms. We only need to edit the template for its structure to be reflected across multiple pages running the same live template.

Great! Now users can quickly fill up the FAQ form with content and get going.Finally, learn how you can a create a new article with this template in this tutorial

A later step in this use case is a tutorial to create a knowledge base template with the live-template macro for creating a new article.

Expand
titleClick here for the FAQ article template source code...
Code Block
title
languagexmlFAQ article template
<ac:structured-macro ac:macro-id="c34f5a61-3bfc-4c06-9a93-38c949c5764c" ac:name="repeating-data" ac:schema-version="1">
  <ac:parameter ac:name="name">faq</ac:parameter>
  <ac:parameter ac:name="initialRows">5</ac:parameter>
  <ac:rich-text-body>
    <table class="relative-table wrapped" style="width: 61.3077%;">
      <colgroup>
        <col style="width: 20.5962%;"/>
        <col style="width: 79.2683%;"/>
      </colgroup>
      <tbody>
        <tr>
          <th>Question</th>
          <td>
            <div class="content-wrapper">
              <p>
                <ac:structured-macro ac:macro-id="0b4e0050-5b63-49e5-b34f-50c37712af19" ac:name="text-data" ac:schema-version="1">
                  <ac:parameter ac:name="name">faq question</ac:parameter>
                  <ac:parameter ac:name="width">100%</ac:parameter>
                  <ac:parameter ac:name="type">line</ac:parameter>
                  <ac:parameter ac:name="content">text</ac:parameter>
                  <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
                  <ac:rich-text-body>
                    <p> </p>
                  </ac:rich-text-body>
                </ac:structured-macro>
              </p>
            </div>
          </td>
        </tr>
        <tr>
          <th>Answer</th>
          <td>
            <div class="content-wrapper">
              <p>
                <ac:structured-macro ac:macro-id="8316feea-e2c8-407b-b274-4dbeecc3b8df" ac:name="text-data" ac:schema-version="1">
                  <ac:parameter ac:name="name">faq question</ac:parameter>
                  <ac:parameter ac:name="width">100%</ac:parameter>
                  <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
                  <ac:rich-text-body>
                    <p> </p>
                  </ac:rich-text-body>
                </ac:structured-macro>
              </p>
            </div>
          </td>
        </tr>
      </tbody>
    </table>
  </ac:rich-text-body>
</ac:structured-macro>
Panel
titleColor#FFF
titleBGColor#205081
titleThe great thing about Live Templates

Imagine you'd like to modify the FAQ template and you have already created several FAQ pages. It would be a nightmare to have to update all of them individually.

By creating a live-template block on the page, the page renders the structure of a predefined template and displays the data entered by the user via forms. We only need to edit the template for its structure to be reflected across multiple pages running the same live template.

...

Next

Part 4 - Creating an Issues and Solutions article template