Page tree

Smart Templates add-on is good at organising the contents from multiple pages, but it can do a lot more.

It works with Confluence templates and with Page properties which helps you to pass variables to the templates.

Here is how it works

Create a template in Confluence (it can be global template or space-specific template). See Atlassian documentation

You can define variables in the templates, we will define a one called "myname"

Here is how our template will look like

Now we create a page and will place there a Smart Templates macro and will reference this template

 

 

And we will also put Confluence standard page properties macro where we define a "myname" variable / property

The variable in the Confluence template will be substituted with the value "Alex", as page properties macro defines this variable here

And the resulting page created by Smart Template will look like this

You can define multiple page properties (as table rows) and multiple sets of page properties (multiple "page properties" macros)

 

 

In addition to user defined page properties there is always these variables in the context present (can be used inside Confluence template)

Variable name 

spacekey

Current space key
pageidPage ID of the page where this smart template is used
pagetitlePage title of the page where this smart template is used

Variable names are case-sensitive!