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 |
|
$scroll.version |
| |
$scroll.creator |
| |
$scroll.creator.name |
| |
$scroll.creator.fullName |
| |
$scroll.creator.email |
| |
$scroll.pageid |
| |
$scroll.pageowner.fullName |
| |
$scroll.pageurl |
| |
$scroll.tinyurl |
| |
$scroll.creationdate |
| |
$scroll.modifier |
| |
$scroll.modifier.name |
| |
$scroll.modifier.fullName |
| |
$scroll.modifier.email |
| |
$scroll.modificationdate |
| |
$scroll.metadata.(YOUR_METADATA_KEY) |
| |
$scroll.pagelabels |
| |
Space info
| Placeholder | Description |
$scroll.spacelogo |
| |
$scroll.space.key |
| |
$scroll.space.name |
| |
$scroll.space.url |
| |
Export info
| Placeholder | Description |
$scroll.content |
| |
$scroll.exporter |
| |
$scroll.exporter.name |
| |
$scroll.exporter.fullName |
| |
$scroll.exporter.email |
| |
$scroll.exportdate |
| |
$scroll.globallogo |
| |
$adhocState |
| |
$scroll.template.name |
| |
$scroll.template.modificationdate |
| |
Page content | Placeholder | Description |
$scroll.includepage.(pagename) $scroll.includepage.(SPACEKEY:pagename) $scroll.includepage.(pageid) |
| |
$scroll.jsoncontentproperty.(key) |
Example:
CODE
During the export, the placeholder is replaced with the text If the property is missing on the export root page and space homepage, the text |
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)
Placeholder | Description | Settings |
---|---|---|
$scroll.custom.(k15t-scroll-document-versions-for-confluence,document-id) | Displays the ID of the exported document |
|
$scroll.custom.(k15t-scroll-document-versions-for-confluence,document-title) | Displays the title of the exported Scroll Document |
|
$scroll.custom.(k15t-scroll-document-versions-for-confluence,version-description) | Displays the description of the exported version |
|
$scroll.custom.(k15t-scroll-document-versions-for-confluence,version-id) | Displays the ID of the exported version |
|
$scroll.custom.(k15t-scroll-document-versions-for-confluence,version-name) | Displays the name of the exported version |
|
$scroll.custom.(k15t-scroll-document-versions-for-confluence,instance-status, "Fallback text") | Displays the status of the exported version |
|
$scroll.custom.(k15t-scroll-document-versions-for-confluence,instance-creation-date,"fallback text", "add-date-format") | Displays the creation date of the Scroll Document |
|
$scroll.custom.(k15t-scroll-document-versions-for-confluence,language-name) | Displays the language of the exported version |
|
$scroll.custom.(k15t-scroll-document-versions-for-confluence,language-language) | Displays the display name of the language for the exported version |
|
$scroll.custom.(k15t-scroll-document-versions-for-confluence,language-code) | Displays the language code of the exported version |
|
$scroll.custom.(k15t-scroll-document-versions-for-confluence,language-country) | Displays the language country of the exported version |
|
$scroll.custom.(k15t-scroll-document-versions-for-confluence,language-variant) | Displays the language variant of the exported version |
|
$scroll.custom.(k15t-scroll-document-versions-for-confluence,variant-description) | Displays the description of the exported variant |
|
$scroll.custom.(k15t-scroll-document-versions-for-confluence,variant-id) | Displays the ID of the exported variant |
|
$scroll.custom.(k15t-scroll-document-versions-for-confluence,variant-name) | Displays the name of the exported variant |
|
Scroll Versions placeholders
If you are using Scroll Versions, you can use the following placeholders in your template:
Placeholder | Description |
---|---|
$scroll.versions.Version.Id |
|
$scroll.versions.Version.Name |
|
$scroll.versions.Version.Description |
|
$scroll.versions.Version.ReleaseDate |
|
$scroll.versions.State.Key |
|
$scroll.versions.State.Name |
|
$scroll.versions.Variant.Id |
|
$scroll.versions.Variant.Name |
|
$scroll.versions.Variant.Description |
|
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 |
|
|
$scroll.versions.Language.Name |
|
|
$scroll.versions.Language.Language |
|
|
$scroll.versions.Language.Country |
|
|
$scroll.versions.Language.Variant |
|
|
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:
Placeholder | Description |
---|---|
$scroll.custom.(k15t-comala-workflows-for-scroll-exporters,comala-workflows-state-name) |
|
$scroll.custom.(k15t-comala-workflows-for-scroll-exporters,comala-workflows-state-description) |
|
$scroll.custom.(k15t-comala-workflows-for-scroll-exporters,comala-workflows-state-content-version) |
|
$scroll.custom.(k15t-comala-workflows-for-scroll-exporters,comala-workflows-comment) |
|
$scroll.custom.(k15t-comala-workflows-for-scroll-exporters,comala-workflows-state-published) |
|
$scroll.custom.(k15t-comala-workflows-for-scroll-exporters,comala-workflows-user) |
|
$scroll.custom.(k15t-comala-workflows-for-scroll-exporters,comala-workflows-date) |
|
Communardo Metadata placeholder
If you are using Metadata for Confluence app, you can use the following placeholder in your template:
Placeholder | Description |
---|---|
$scroll.custom.(com.communardo.confluence.metadata, communardo-metadata-pdf-integration,X) |
|
Use Page Properties as Custom 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.
Navigate to your export's root page (because page properties are always taken from the export root page)
Insert a Page Properties macro on the page
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#1
Value#1
Key#2
Value#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.
Open your Word template and insert a Page Property placeholder using the following style: $scroll.pageproperty.(page-property-key)
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)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:
Parameters | Description | Placeholder example |
---|---|---|
$scroll.pageproperty.(PP-key) |
|
|
$scroll.pageproperty.(PP-key,fallback-enabled) |
|
|
$scroll.pageproperty.(PP-key,fallback-disabled) |
|
|
$scroll.pageproperty.(PP-key,macro-id) |
|
|
$scroll.pageproperty.(PP-key,fallback-enabled,alternate-text) |
|
|
$scroll.pageproperty.(PP-key,fallback-disabled,alternate-text) |
|
|
$scroll.pageproperty.(PP-key,macro-id,fallback-enabled) |
|
|
$scroll.pageproperty.(PP-key,macro-id,fallback-disabled) |
|
|
$scroll.pageproperty.(PP-key,macro-id,fallback-enabled,alternate-text) |
|
|
$scroll.pageproperty.(PP-key,macro-id,fallback-disabled,alternate-text) |
|
|
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:
Insert the Metadata (Metadata Plugin) macro on your page and define a metadata key and value
Open your Word template and enter the metadata placeholder in the position you want to insert the metadata – e.g. $scroll.metadata.(metadata-key)
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:
Parameters | Description | Placeholder example |
---|---|---|
$scroll.metadata.(metadata-key) |
|
|
$scroll.metadata.(metadata-key,fallback-enabled) |
|
|
$scroll.metadata.(metadata-key,fallback-disabled) |
|
|
$scroll.metadata.(metadata-key,alternate-text) |
|
|
$scroll.metadata.(metadata-key,fallback-enabled,alternate-text) |
|
|
$scroll.metadata.(metadata-key,fallback-disabled,alternate-text) |
|
|