Skip to main content
Skip table of contents

Add Placeholders

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.nameThe account name of the creator of the exported root page.
$scroll.creator.fullNameThe full name of the creator of the exported root page.
$scroll.creator.emailThe email of the creator of the exported root page.
$scroll.pageidThe page ID of the exported root page.
$scroll.pageurlThe URL of the exported root page.
$scroll.tinyurlThe 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.

To avoid interpretation, the placeholder text should be quoted using quotation marks ( ' or "). 

$scroll.modifier

The last modifier of the exported root page.

$scroll.modifier.nameThe 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.

To avoid interpretation, the placeholder text should be quoted using quotation marks ( ' or "). 

$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 Comala Metadata App as a prerequisite.

(info) This placeholder is only compatible with the Server and Data Center version of Scroll Word Exporter. 

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.keyThe spacekey of the current space.
$scroll.space.nameThe name of the current space.
$scroll.space.urlThe 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.nameExporter's account name.
$scroll.exporter.fullNameExporter's account name.
$scroll.exporter.emailExporter'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.

To avoid interpretation, the placeholder text should be quoted using quotation marks ( ' or "). 

$scroll.globallogoThe global logo of the Confluence system.

$adhocState (server only)

The state of the export root page taken from Comala Document Management. 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.

(info) This placeholder is only compatible with the server version of Scroll Word Exporter. 

$scroll.template.namePrints the name of the export template used for the export
$scroll.template.modificationdatePrints the last modification date of the export template used.
Page content Placeholder  Description

$scroll.includepage.(pagename)

$scroll.includepage.(SPACEKEY:pagename)

$scroll.includepage.(pageid)

The content of a specific page.

Scroll Document placeholders

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

Please note that these placeholders are available when using Scroll Documents v3.6.0 (and newer)

PlaceholderDescriptionSettings

$scroll.custom.(k15t-scroll-document-versions-for-confluence,document-id)

Displays the ID of the exported document
  • To define fallback text (if the exported document ID is unavailable), simply the change the text in bold: $scroll.custom.(k15t-scroll-document-versions-for-confluence,document-id, "Fallback text")

$scroll.custom.(k15t-scroll-document-versions-for-confluence,document-title)

Displays the title of the exported Scroll Document
  • To define fallback text (if the exported document title is unavailable), simply the change the text in bold: $scroll.custom.(k15t-scroll-document-versions-for-confluence,document-title, "Fallback text")

$scroll.custom.(k15t-scroll-document-versions-for-confluence,variant-name)

Displays the name of the exported variant
  • The use of variants in Scroll Documents requires an extension app, Variants for Scroll Documents
  • To define fallback text (if the variant name is unavailable), simply the change the text in bold: $scroll.custom.(k15t-scroll-document-versions-for-confluence,variant-name, "Fallback text")
$scroll.custom.(k15t-scroll-document-versions-for-confluence,language-name)Displays the language of the exported version
  • The use of translation in Scroll Documents requires an extension app, Translations for Scroll Documents
  • To define fallback text (if the translation is unavailable), simply the change the text in bold: $scroll.custom.(k15t-scroll-document-versions-for-confluence,language-name, "Fallback text")
$scroll.custom.(k15t-scroll-document-versions-for-confluence,language-code)Displays the language code of the exported version
  • The use of translation in Scroll Documents requires an extension app, Translations for Scroll Documents
  • To define fallback text (if the translation is unavailable), simply the change the text in bold: $scroll.custom.(k15t-scroll-document-versions-for-confluence,language-code, "Fallback text")

$scroll.custom.(k15t-scroll-document-versions-for-confluence,version-name)

Displays the name of the exported version
  • To define fallback text (if the version name is unavailable), simply the change the text in bold: $scroll.custom.(k15t-scroll-document-versions-for-confluence,version-name, "Fallback text")

$scroll.custom.(k15t-scroll-document-versions-for-confluence,instance-creation-date,"fallback text", "add-date-format")

Displays the creation date of the Scroll Document
  • You need to apply add a fallback text and a date formatting expression for the placeholder. For example:
    • $scroll.custom.(k15t-scroll-document-versions-for-confluence,instance-creation-date, "my fallback text", "d MMM yyyy HH:mm:ss") creates a date in the format: 2 May 2022 13:22:50
    • $scroll.custom.(k15t-scroll-document-versions-for-confluence,instance-creation-date, "my fallback text", "d MMM yyyy") creates a date in the format: 2 May 2022
    • $scroll.custom.(k15t-scroll-document-versions-for-confluence,instance-creation-date, "my fallback text", "yyyy MMM d") creates a date in the format: 2022 May 2

$scroll.custom.(k15t-scroll-document-versions-for-confluence,instance-status, "Fallback text")

Displays the status of the exported version
  • To define fallback text (if the version status is unavailable), simply the change the text in bold: $scroll.custom.(k15t-scroll-document-versions-for-confluence,instance-status, "Fallback text")

Scroll Versions placeholders 

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

PlaceholderDescription
$scroll.versions.Version.IdThe ID of the exported version.
$scroll.versions.Version.NameThe name of the exported version.
$scroll.versions.Version.DescriptionThe description of the exported version.
$scroll.versions.Version.ReleaseDateThe release date of the exported version.
$scroll.versions.State.KeyThe key of the Scroll Versions workflow.
$scroll.versions.State.NameThe name of the current Scroll Versions workflow of the exported page.
$scroll.versions.Variant.IdThe ID of the exported variant.
$scroll.versions.Variant.NameThe name of the exported variant.
$scroll.versions.Variant.DescriptionThe 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.KeyThe language key of the exported language.pt_BR
$scroll.versions.Language.NameThe language name of the exporter language.Portuguese (Brazil)
$scroll.versions.Language.LanguageThe language of the exported language.Portuguese
$scroll.versions.Language.CountryThe country of the exported language.Brazil
$scroll.versions.Language.VariantThe variant of the exported language.(This depends on the system and environment of the Confluence Server, usually empty)

Comala Document Management placeholders 

If you are using the Comala Document Management for Scroll Exporters integration, you can use the following placeholders in your template:

PlaceholderDescription
$scroll.custom.(k15t-comala-workflows-for-scroll-exporters,comala-workflows-state-name)

The name of the workflow state of the root page

To define fallback text to show if a workflow is not defined, simply the change the text in bold: $scroll.custom.(k15t-comala-workflows-for-scroll-exporters,comala-workflows-state-name, “your fallback text here”)

$scroll.custom.(k15t-comala-workflows-for-scroll-exporters,comala-workflows-state-description)

The description of the workflow state of the root page

To define fallback text to show if a workflow is not defined, simply the change the text in bold: $scroll.custom.(k15t-comala-workflows-for-scroll-exporters,comala-workflows-state-description, “your fallback text here")

$scroll.custom.(k15t-comala-workflows-for-scroll-exporters,comala-workflows-state-content-version)

The content revision that the current workflow state of the root page refers to

To define fallback text to show if a workflow is not defined, simply the change the text in bold: $scroll.custom.(k15t-comala-workflows-for-scroll-exporters,comala-workflows-state-content-version, “your fallback text here”)

$scroll.custom.(k15t-comala-workflows-for-scroll-exporters,comala-workflows-comment)

The comment provided when the root page was transitioned into the current workflow state

To define fallback text to show if a workflow is not defined, simply the change the text in bold: $scroll.custom.(k15t-comala-workflows-for-scroll-exporters,comala-workflows-comment, “your fallback text here”)

$scroll.custom.(k15t-comala-workflows-for-scroll-exporters,comala-workflows-state-published)

The text to show if the page is in a public state. By default, Public will be rendered for the placeholder.

To change the default, simply enter your own text value. For example, $scroll.custom.(k15t-comala-workflows-for-scroll-exporters,comala-workflows-state-published,"Published") renders Published (instead of Public) in the export when the page is in a public state.

To define fallback text to show if a workflow is not defined, simply the change the text in bold: $scroll.custom.(k15t-comala-workflows-for-scroll-exporters,comala-workflows-state-published, “”, “”, “your fallback text here”)

$scroll.custom.(k15t-comala-workflows-for-scroll-exporters,comala-workflows-user)

The user who transitioned the root page into its current workflow state

To define fallback text to show if a workflow is not defined, simply the change the text in bold: $scroll.custom.(k15t-comala-workflows-for-scroll-exporters,comala-workflows-user, “Full name”, “your fallback text here”)

$scroll.custom.(k15t-comala-workflows-for-scroll-exporters,comala-workflows-date)

The date when the root page was transitioned into the current workflow state

You can apply SimpleDateFormat on the date by appending the formatting expression. For example  $scroll.custom.block.(k15t-comala-workflows-for-scroll-exporters,comala-workflows-date,"yyyy-MM-dd") creates a date in the format: 2010-08-27.

YTo define fallback text to show if a workflow is not defined, simply the change the text in bold: $scroll.custom.(k15t-comala-workflows-for-scroll-exporters,comala-workflows-date, “yyyy-MM-dd HH:mm:ss”, “your fallback text here”)

Communardo Metadata placeholder 

If you are using Metadata for Confluence app, you can use the following placeholder in your template:

PlaceholderDescription
$scroll.custom.(com.communardo.confluence.metadata, communardo-metadata-pdf-integration,X)

Renders a metadatafield value defined via the Metadata for Confluence app

  • You must replace X in the placeholder with the Communardo metadata ID field. The Metadata ID can be obtained in the global Metadata fields section (in Confluence Administration) by hovering over Edit (for the chosen field) and viewing the accompanying URL  

Customize your own placeholders

Interested in 3rd-party placeholder support?

Scroll Word Exporter also supports 3rd-party placeholders through a Velocity based API - read more here

You can also customize your own placeholders in your template:

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

Step 1: 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. The added table should contain a left header column for the keys like this:

    Key#1Value#1
    Key#2Value#2

Step 2: 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) 

Page property placeholder parameters

The page property placeholder has a number of different parameters that can be defined in the placeholder text to define the export result. The table displays the possible combinations for the parameters that can be used:

ParametersDescriptionPlaceholder example
$scroll.pageproperty.(PP-key)
  • Renders the value from the defined key in the page property macro on the export root page
$scroll.pageproperty.(test)

$scroll.pageproperty.(PP-key,fallback-enabled)

  • Renders the value from the defined key in the page property macro on the export root page
    • If no page property key is defined on the export root page, a fallback mechanism will check for the key on the Scroll Document root page or space home page when defining the text true
$scroll.pageproperty.(test,true)
$scroll.pageproperty.(PP-key,fallback-disabled)
  • Renders the value from the defined key in the page property macro on the export root page
    • If no page property key is defined on the export root page, a fallback mechanism will not be enabled to check for the key on the Scroll Document root page or space home page when defining the text false
$scroll.pageproperty.(test,false)
$scroll.pageproperty.(PP-key,macro-id)
  • Renders the value from the defined key in the page property macro with the specific macro ID on the export root page
$scroll.pageproperty.(test,macro1)

$scroll.pageproperty.(PP-key,fallback-enabled,alternate-text)

  • Renders the value from the defined key in the page property macro on the export root page
    • If no page property key is defined on the export root page, a fallback mechanism will check for the key on the Scroll Document root page or space home page when defining the text true
    • If no page property key is defined on the space homepage, alternate text will be rendered in the export instead
$scroll.pageproperty.(test,true,no content included)
$scroll.pageproperty.(PP-key,fallback-disabled,alternate-text)
  • Renders the value from the defined key in the page property macro on the export root page
    • If no page property key is defined on the export root page, a fallback mechanism will not check for the key on the Scroll Document root page or space home page when defining the text false
    • If no page property key is defined on the export root page, alternate text will be rendered in the export instead
$scroll.pageproperty.(test,false,no content included)

$scroll.pageproperty.(PP-key,macro-id,fallback-enabled)

  • Renders the value from the defined key in the page property macro with the specific macro ID on the export root page
    • If no page property key is defined on the export root page, a fallback mechanism will check for the key with the specific macro ID on the Scroll Document root page or space home page when defining the text true
$scroll.pageproperty.(test,macro1,true)

$scroll.pageproperty.(PP-key,macro-id,fallback-disabled)

  • Renders the value from the defined key in the page property macro with the specific macro ID on the export root page
    • If no page property key is defined on the export root page, a fallback mechanism will not check for the key with the specific macro ID on the Scroll Document root page or space home page when defining the text false
$scroll.pageproperty.(test,macro1,false)

$scroll.pageproperty.(PP-key,macro-id,fallback-enabled,alternate-text)

  • Renders the value from the defined key in the page property macro with the specific macro ID on the export root page
    • If no page property key is defined on the export root page, a fallback mechanism will check for the key with the specific macro ID on the Scroll Document root page or space home page when defining the text true
    • If no page property key is defined with the specific macro ID on the space homepage, alternate text will be rendered in the export instead
$scroll.pageproperty.(test,macro1,true,no content included)

$scroll.pageproperty.(PP-key,macro-id,fallback-disabled,alternate-text)

  • Renders the value from the defined key in the page property macro with the specific macro ID on the export root page
    • If no page property key is defined on the export root page, a fallback mechanism will not check for the key with the specific macro ID on the Scroll Document root page or space home page when defining the text false
    • If no page property key is defined with the specific macro ID on the export rootpage, alternate text will be rendered in the export instead
$scroll.pageproperty.(test,macro1,false,no content included)

Use Metadata macro as a placeholder 

You can also use the Comalatech Metadata app, 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.

Metadata placeholder parameters

The Metadata placeholder has a number of different parameters that can be defined in the placeholder text to define the export result:

ParametersDescriptionPlaceholder example
$scroll.metadata.(metadata-key)
  • Renders the value from the defined key in the Metadata macro on the export root page
$scroll.metadata.(test)

$scroll.metadata.(metadata-key,fallback-enabled)

  • Renders the value from the defined key in the Metadata macro on the export root page
    • If no Metadata key is defined on the export root page, a fallback mechanism will check for the key on the Scroll Document root page or space home page when defining the text true

$scroll.metadata.(test,true)

$scroll.metadata.(metadata-key,fallback-disabled)

  • Renders the value from the defined key in the Metadata macro on the export root page
    • If no Metadata key is defined on the export root page, a fallback mechanism will not check for the key on the Scroll Document root page or space home page when defining the text false

$scroll.metadata.(test,false)

$scroll.metadata.(metadata-key,alternate-text)

  • Renders the value from the defined key in the Metadata macro on the export root page
    • If no Metadata key is defined on the export root page, alternate text will be rendered in the export instead
$scroll.metadata.(test,no content included)

$scroll.metadata.(metadata-key,fallback-enabled,alternate-text)

  • Renders the value from the defined key in the Metadata macro on the export root page
    • If no Metadata key is defined on the export root page, a fallback mechanism will check for the key on the Scroll Document root page or space home page when defining the text true
    • If no Metadata key is defined on the space homepage, alternate text will be rendered in the export instead
$scroll.metadata.(test,true,no content included)

$scroll.metadata.(metadata-key,fallback-disabled,alternate-text)

  • Renders the value from the defined key in the Metadata macro on the export root page
    • If no Metadata key is defined on the export root page, a fallback mechanism will not check for the Metadata key on the Scroll Document root page or space home page when defining the text false
    • If no Metadata key is defined on the export root page, alternate text will be rendered in the export instead
$scroll.metadata.(test,false,no content included)
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.