Here's a quick start guide to working with Scaffolding.
In this example, we're going to build a knowledge base system consisting a set of knowledge base articles that would look like this:
Follow these steps:
Step 1 - Set up the template
Go to Space Settings > Look and Feel > Templates.
- Click Create New Template. Name it "Knowledge Base Article Template". In the template editor, add a Scaffolding Field Group macro.
The Field Group settings window appears, with the available fields. Add a Paragraph field into the editor area for the Summary section. Drag and drop a Paragraph field from the sidebar into the editor area. Type in "Summary" above the Paragraph field.
Below the Summary paragraph, insert a 2x2 table to hold the System and Version fields. Type in "System" and "Version" into the left-hand cells.
- Click the empty cell on the right of System, then drag and drop a Dropdown List field from the sidebar into the empty cell. Alternatively, you can also type /dropdown and click on Dropdown List in the popup. This will create a dropdown menu later. In the sidebar under Field Settings, fill in the labels for the dropdown, for example, Mac OS X, Windows 10, Ubuntu, etc. Press enter to create a label and click the empty cell on the right of Version to continue (the label text is auto-saved).
- Drag and drop a Number field from the sidebar into the empty cell on the right of Version.
- Add any other necessary fields like Diagnosis, Cause and Solution.
- The end result will look something like this. Click Save to save the Field Group. This will exit the Field Group settings menu.
- Finally, click Save at top right, to save the overall template.
Step 2 - Create a page
- Create a new page.
Add a Live Template macro.
- Specify the template name, "Knowledge Base Article Template", and click Insert to continue
- Enter a page title, and click Publish to publish the page.
Step 3 - Add content
- While on the newly-published page, click Edit Content.
- Populate the fields accordingly. The Paragraph editor under Summary supports most of the features you would normally find in a standard Confluence Cloud editor. This includes fonts, text color, lists, links, and more.
- Continue with the System and Version fields below. The System row now includes a dropdown menu which allows you to pick from the labels you created earlier.
- The Version field only allows you to enter numbers.
- Fill in the rest of the fields as needed, then click Save Content. Your page will be like below:
Step 4 - Update template
- Go back to the "Knowledge Base Article Template" you created and edit it.
- Edit the Field Group macro.
- To demonstrate the benefits of using a Live Template, let's make make some changes to this page. We'll add a new text field and change some of the existing fields. Above the Summary section, add some contact information. In the 2x2 table below, change System to Operating system, and Version to Version affected.
- Click Save to save the Field Group, then click Save again to save the template.
- Load the "fails with error 52" page again, or refresh the page.
You can see that the changes you made to the template are now automatically reflected on the "fails with error 52" page, without you having to edit that specific page. This allows you to manage tens or even hundreds of pages easily by just applying changes to the template.