We have been adding a lot of pages by now and every time we started from scratch; but we don't have to. When you find yourself creating the same page structure over again, or you want your users to use the same structure for reasons of consistency, templates are the answer.
Templates are predefined pages that can be used as a scaffold when you are creating pages. Only new pages can be created from a template, and when a template is used the new page will contain the same content as the template. Templates are very useful when you want a uniform style or format for your pages.
When there are templates available, you can start using them to create new pages. When you create a page based on a template, Confluence will copy the following content and information to the new page:
The newly created page is not connected in any way to the original template; changes made to the template will not reflect on the created page. It is not possible to apply a template to an existing page; templates can only be used when creating a new page. The newly created page can be edited in any way a blank page can; content can be added, updated, and removed.
To create a page based on a template, perform the following steps:
The following screenshot displays the available templates that can be used to create a new page:
In Confluence, templates can be created on two levels of the Confluence hierarchy:
Space templates can be created by Space Administrators and are only available in the space you create them in.
To add a template for a space, perform the following steps:
If your space uses the documentation theme:
You will be redirected to the Create Template screen. How you can add content and create your template is explained in the Adding content to your template section.
Global templates can be created by Confluence Administrators and are available in all spaces within Confluence.
To add a global template, perform the following steps:
You will be redirected to the Create Template screen. How you can add content and create your template is explained in the Adding content to your template section.
The Create Template view is very similar to the regular editor in Confluence:
What normally is the page title will now be the template name. The template name will be displayed when you create a new page, so choose a descriptive name for your template.
The content of the template is just like a regular page; you can use styles, layouts, and other formatting. You can also add links and macros. In addition to the normal features, the template editor also allows you to add variables and instruction texts. Using variables in your template will create a form for collection of data when someone adds a page based on the template.
Some points to take into account when creating a template are:
Then insert the image by performing the following steps:
These texts can provide instructions for users on how to use the template and which data is expected at certain locations.
To insert an instructional text, perform the following steps:
The type of the placeholder can be changed from "text" to a "user mention", which starts the mention's autocomplete when the author starts typing. To change the placeholder type, click on the placeholder and select User Mention.
Each variable must have a unique name. If you add the same variable more than once in the same template, Confluence will provide both placeholders with the same value. This is useful when you need the same information in more than one position.
To insert a variable into a template, perform the following steps:
Speed up variable entry by using the keyboard shortcut $ (Shift + 4) for autocomplete.
These are the types of variables available:
Variable type |
Description |
---|---|
Creates a single-line text input field as shown: | |
Creates a textbox that allows more than one line of text. By default, this textbox is of 5 rows with 100 characters wide. You can change the size in the property panel: | |
Creates a drop-down list. You must specify the values for the drop-down list. These values:
|
In addition to creating your own templates, you can download predefined templates from the Atlassian Marketplace in the form of a template bundle or Blueprints. Each bundle contains one or more templates, created by Atlassian or other parties.
An example of one of those bundles is available here:
https://marketplace.atlassian.com/20489
Downloading and installing add-ons, like template bundles, is described in more detail in Chapter 9, General Administration.
To check which bundles are available and can be imported, perform the following steps:
If you have one or more template bundles installed, you can import them to make those templates available for your users.
To import a template, perform the following steps:
3.135.246.245