Introducing Placeholders

How to use placeholders to insert page attributes, page macro properties and other variables
word-template-exporter-confluence confluence word help

Introduction

You can now make use of placeholders in your templates. When exporting, the placeholders will be replaced with values from page metadata, page macro properties and content properties.

Placeholder reference

The following section explains all available placeholders. To make use of them, copy the placeholder value to your Word template. For example you could insert Version ${page.version} created on ${date.created} by ${page.creator} to the header of you template. When you export a page from Confluence using this template, the header would show something like this: Version 1 created on 2019-12-01 by test-user.

Page attributes

Page attributes contain information about the page that is exported. If you export multiple pages at once using the “include child pages” option, then the page attributes refer to the root/parent page of the current export.

Placeholder Example value Description
${page.title} My page Title of the page
${page.version} 1 Version of the page
${page.version.comment} Some updates Version comment
${page.creator} jane User name of the person who created the page
${page.creator.fullname} Jane Doe Full name of the person who created the page
${page.creator.email} [email protected] Email of the person who created the page
${page.creator.uid} 123 Unique ID of the person who created the page
${page.modifier} jon User name of the person who modified the page last
${page.modifier.fullname} Jon Doe Full name of the person who modified the page lat
${page.modifier.email} [email protected] Email of the person who modified the page last
${page.modifier.uid} 456 Unique ID of the person who modified the page last
${page.date.created} 2019-12-01 Date in ISO format (yyyy-MM-dd) when the page was created
${page.date.created.us} 12/01/2019 Date in MM/dd/yyyy format when the page was created
${page.date.created.eu} 01.12.2019 Date in dd.MM.yyyy format when the page was created
${page.date.modified} 2019-12-01 Date in ISO format (yyyy-MM-dd) when the page was last modified
${page.date.modified.us} 01.12.2019 Date in MM/dd/yyyy format when the page was last modified
${page.date.modified.eu} 01.12.2019 Date in dd.MM.yyyy format when the page was last modified
${page.space.key} ds The key of the page’s space
${page.space.name} Demo Space The name of the page’s space

Page properties

Page properties can be added to the page by inserting the page properties macro. You can then reference page properties by using placeholders starting with pma. For example if your page contains a page property Status, then you can reference it by using ${pma.Status}.

The following screenshot shows an example based on the Confluence decision page template.

Page properties example page

In this example, the page contains five page properties:

The following screenshot shows a Word template that uses placeholders to include these properties on the cover page.

Page properties example template

The template makes use of two page attribute placeholders (${page.title} and ${page.version}) and four page properties placeholders (${pma.Due date}, ${pma.Status}, ${pma.Owner} and ${pma.Stakeholders}).

And the next screenshot shows the result when exporting this page from Confluence using the above template:

Page properties example result

Content properties

It is also possible to retrieve content properties via the Content Property Manager or Content Property Service interface. Content properties are key value pairs that can be associated with Confluence pages and other content entities.

To retrieve properties, use the cpm or cps prefix, for example:

Placeholder Example value Description
${cpm.myTestProperty} Test 123 Looks up the property myTestProperty using the content property manager
${cps.anotherPropKey} Other value Looks up the property anotherPropKey using the content property service

Advanced export options explained

How to add a cover page, generate a table of contents, adjust header styles and other settings
word-template-exporter-confluence confluence word help

Using custom table styles in your Word template

How to use custom table styles
word-template-exporter-confluence confluence word help

Getting started with the Word Template Exporter for Confluence

Convert your Confluence pages into professional looking Word documents
word-template-exporter-confluence confluence word help