Using Placeholders
Placeholders can be used to reference metadata and insert this metadata in headers or footers and on static pages (for example title pages, TOCs, etc.).
On top of the placeholders listed here, you can also define your own placeholders using the Page Properties Macro. Please have a look at the following page for further details: Using Page Properties as placeholder
Available Placeholders
Placeholder | Type | Description | Variations | |||||
---|---|---|---|---|---|---|---|---|
Page Information | ||||||||
$page | The page from which the export has been started. | $page.version - Current version of the page $page.title - Page title $page.urlPath - URL path to the page | ||||||
$creationDate | The date when the page has been created. | |||||||
$lastModificationDate | The date of the last page update. | |||||||
$exportDate | The date when the page has been exported. | |||||||
$creator | The name of the user who created the page. | $creator.name - User's account name $creator.fullName - User's full name $creator.email - User's email | ||||||
$lastModifier | The name of the user who updated the page to the current version. | $lastModifier.name - Modifier's account name | ||||||
$pageNumber |
| The number of the current page in the resulting document. | ||||||
$siteTitle |
| The site's title which will appear on the browser title bar. | ||||||
$page.tinyUrl | String (HTML) | The tiny URL of the exported root page. | ||||||
$dateTimeFormatter | Used to format
| |||||||
Space Information | ||||||||
$space | The space where the page is located. | $space.key - Space key $space.name - Space name $space.urlPath - URL path to space | ||||||
$spaceLogo |
| The space logo as HTML. If the download URL of the space logo is required, use $spaceLogo.getSrc() | ||||||
Export Information | ||||||||
$exporter | The name of the current user (who is exporting the page). | $exporter.name - Exporter's account name $exporter.fullName - Exporter's full name $exporter.email - Exporter's email | ||||||
$adhocState | String (HTML) | The state of the export root page taken from Comala Workflows. Possible values: 'DRAFT', 'PUBLISHED' or | ||||||
$baseUrl |
| The base URL of the Confluence system. | ||||||
$globalLogo |
| The global Logo of the Confluence system. | ||||||
$siteTitle |
| The site's title which will appear on the browser title bar. | ||||||
$selectedLabels | String (HTML) | The name of the selected or excluded label(s). | ||||||
Static Content | It is also possible to include static content from other pages and render it using the Scroll infrastructure. | |||||||
$include.getPage("Navigation") $include.getPage("Navigation Page") | Returns the content of the page 'Navigation' (or 'Navigation Page') in the same space or | |||||||
$include.getPage("spc", "Navigation") $include.getPage("spc", "Navigation Page") | Returns the content of the page 'Navigation' (or 'Navigation Page') in the space with key 'spc' or | |||||||
Own Metadata | This section refers to metadata as supported by the Confluence Metadata Plugin. | |||||||
$metadata.from("Author") | Returns the content of the metadata "Author" set on the root page of the export. | |||||||
$metadata.from($space, "Author") | Returns the content of the metadata "Author" set on the space that the root page of the export is in. | |||||||
$contentProperty.from("Author") | Returns the value of the content property "Author" set on the root page of the export. | |||||||
$contentProperty.from($space, "Author") | Returns the value of the content property "Author" set on the space that the root page of the export is in. | |||||||
Some background on metadata and content properties The metadata macro stores its data in a key-value store provided by Confluence called Content Properties. When you insert a metadata macro on a page with the key "Author" and the value "K15t Software" then the storage will actually contain this:
The metadata macro prefixes all keys with " You can now access this data in two ways:
Both do exactly the same, the |
Scroll Versions Placeholders
If you are using Scroll Versions, you can use the following placeholders in your template:
When exporting a page from Currently Published (<Scroll Versions 3.0) or Reader View (>Scroll Versions 3.0), only these placeholders are resolved:
Placeholder | Rendered value |
---|---|
$scrollVersions.Version.Id | current |
$scrollVersions.Version.Name | Currently Published |
$scrollVersions.Version.Description | currently published version |
Placeholder | Type | Description |
---|---|---|
$scrollVersions.Version.Id | String
| The ID of the exported version. |
$scrollVersions.Version.Name | String
| The name of the exported version. |
$scrollVersions.Version.Description | String
| The description of the exported version. |
$scrollVersions.Version.ReleaseDate | DateTime
| The release date of the exported version. Should be used together with |
$scrollVersions.Version.Archived | Boolean
| The archive status of the exported version: |
$scrollVersions.State.Key | String
| The key of the Scroll Versions workflow. |
$scrollVersions.State.Name | String
| The name of the current Scroll Versions workflow of the exported page. |
$scrollVersions.Variant.Id | String
| The ID of the exported variant. |
$scrollVersions.Variant.Name | String
| The name of the exported variant. |
$scrollVersions.Variant.Description | String
| 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 |
---|---|---|
$scrollVersions.Language.Key | The language key of the exported language. | pt_BR |
$scrollVersions.Language.Name | The language name of the exporter language. | Portuguese (Brazil) |
$scrollVersions.Language.Language | The language of the exported language. | Portuguese |
$scrollVersions.Language.Country | The country of the exported language. | Brazil |
$scrollVersions.Language.Variant | The variant of the exported language. | (This depends on the system and environment of the Confluence Server, usually empty) |