×

You're using an outdated browser

For a better experience, keep your browser up to date. Check here for the latest version.

Manual

Add placeholders

Thomas Rough

Thomas Rough Last update: Nov 6, 2018

You can reference metadata in your exports by adding placeholders to your Word templates.

During export, Scroll Word Exporter replaces the placeholders with metadata from Confluence, such as the page creator’s name or email address.

How to use placeholders

Simply add the placeholder (displayed in the 'Placeholder' column in the table below) into your Word template. Upon export the placeholder will be replaced by the data that the placeholder references.

Available placeholders

Placeholder

Description

Page info















$scroll.title

The title of the exported root page.

$scroll.version

The version of the exported root page.

$scroll.creator

The creator of the exported root page.

$scroll.creator.name The account name of the creator of the exported root page.
$scroll.creator.fullName The full name of the creator of the exported root page.
$scroll.creator.email The email of the creator of the exported root page.
$scroll.pageid The page ID of the exported root page.
$scroll.pageurl The URL of the exported root page.
$scroll.tinyurl The tiny URL of the exported root page.

$scroll.creationdate

The creation date of the exported root page.

You can apply SimpleDateFormat on the date by appending .(FORMATTING-EXPRESSION). For example $scroll.creationdate.(yyyy-MM-dd) creates a date in the format: 2010-08-27.

$scroll.modifier

The last modifier of the exported root page.

$scroll.modifier.name The last modifier's account name
$scroll.modifier.fullName The last modifier's account name
$scroll.modifier.email The last modifier's account name

$scroll.modificationdate

The last modification date of the exported root page.

You can apply SimpleDateFormat on the date by appending .(FORMATTING-EXPRESSION). For example $scroll.creationdate.(yyyy-MM-dd) creates a date in the format: 2010-08-27.

$scroll.metadata.(YOUR_METADATA_KEY)

This placeholder can be used to access metadata defined on the root page of your export. This placeholder depends on the Confluence Metadata Plugin as a prerequisite. 

Space info

   

Placeholder

Description

$scroll.spacelogo

The space logo of the current space.

You can scale the space logo by appending .(HEIGHT, WIDTH). For example $scroll.spacelogo.(200,100) renders the space logo with 200px height and 100px width.

$scroll.space.key The spacekey of the current space.
$scroll.space.name The name of the current space.
$scroll.space.url The URL of the current space.

Export info




  

Placeholder

Description

$scroll.content

The full content of the export.
(warning) This placeholder should only be used once in a template, as it defines where in the template the Confluence content should be exported, which is important if you have defined static pages like a title page, or a table of contents.

$scroll.exporter

The user who exported the export.

$scroll.exporter.name Exporter's account name.
$scroll.exporter.fullName Exporter's account name.
$scroll.exporter.email Exporter's account name.

$scroll.exportdate

The date of the export.

You can apply SimpleDateFormat on the date by appending .(FORMATTING-EXPRESSION). For example $scroll.creationdate.(yyyy-MM-dd) creates a date in the format: 2010-08-27.

$scroll.globallogo The global logo of the Confluence system.

$adhocState

The state of the export root page taken from Comala Workflows. Possible values: 'DRAFT', 'PUBLISHED' or null (if there are no Comala Workflows in this space).
You may want to use $!adhocState to avoid 'null' printouts.
Page content  Placeholder   Description

$scroll.includepage.(pagename)

$scroll.includepage.(SPACEKEY:pagename)

$scroll.includepage.(pageid)

The content of a specific page.

Scroll Versions placeholders 

If you are using Scroll Versions, you can use the following placeholders in your template:

Placeholder Description
$scroll.versions.Version.Id The ID of the exported version.
$scroll.versions.Version.Name The name of the exported version.
$scroll.versions.Version.Description The description of the exported version.
$scroll.versions.Version.ReleaseDate The release date of the exported version.
$scroll.versions.Version.Archived

The archive status of the exported version:
(info) Returns "true" if the exported version is archived.
(info) Returns "false" if the exported version is not archived.

$scroll.versions.State.Key The key of the Scroll Versions workflow.
$scroll.versions.State.Name The name of the current Scroll Versions workflow of the exported page.
$scroll.versions.Variant.Id The ID of the exported variant.
$scroll.versions.Variant.Name The name of the exported variant.
$scroll.versions.Variant.Description The description of the exported variant. 

Scroll Translations placeholders 

If you are using Scroll Translations, you can use the following placeholders in your template:

Placeholder

Description

Example
$scroll.versions.Language.Key The language key of the exported language. pt_BR
$scroll.versions.Language.Name The language name of the exporter language. Portuguese (Brazil)
$scroll.versions.Language.Language The language of the exported language. Portuguese
$scroll.versions.Language.Country The country of the exported language. Brazil
$scroll.versions.Language.Variant The variant of the exported language. (This depends on the system and environment of the Confluence Server, usually empty)

Use page properties as placeholders

You can use the Confluence Page Properties macro to define customized text placeholders in your exports. To use page properties as placeholders you need to:

  • create page properties on your Confluence page
  • insert a page property placeholder into your Word template

Note

Currently, it's only possible to use text as placeholder in the page properties macro. The requirement to also display images is already tracked in our JIRA system: EXP-924

Create page properties

To start, you need to create the page properties to be used as placeholders.

  1. Navigate to your export's root page (because page properties are always taken from the export root page)
  2. Insert a Page Properties macro on the page
  3. Add a two-column table into the macro body, with the left column containing the keys (i.e. the page property names), and the right column containing the corresponding page property values.

Define your page property placeholder

Now you can use the content that you defined in the Page Properties macro as a placeholder in your export.

  1. Open your Word template and insert a Page Property placeholder using the following style: $scroll.pageproperty.(page-property-key)
  2. Enter the name of the page property key (defined on your Confluence page), after a full stop in brackets. The placeholders are case-sensitive. 
    e.g. The key User would be written as $scroll.pageproperty.(User)
  3. Save and upload you Word template to Confluence

After following these steps, the corresponding page property value will be added to your export. 

Using multiple page property macros?

If you insert multiple page property macros on the root page, you have to assign an ID to each Page Properties macro, so you can differentiate between them when referring to them in your Word template. For example, ID 123.

You then have to refer to this ID via the placeholder in your Word template – for example: $scroll.pageproperty.(User,123) 

Use Metadata macro as a placeholder 

You can also use the Confluence Metadata macro, to define customized text placeholders in your exports.

To do this:

  1. Insert the Metadata (Metadata Plugin) macro on your page and define a metadata key and value
  2. Open your Word template and enter the metadata placeholder in the position you want to insert the metadata – e.g. $scroll.metadata.(metadata-key) 
  3. Upload your Word template and export your specific page. 

Once the page is exported, the placeholder you inserted in step 2 is overwritten with the defined value within the metadata macro.

2xlatest
We use cookies to create a secure and effective browsing experience for our website visitors and to understand how you use our site (i.e. Google Analytics). For more information: click here.
Ok