Skip to main content
Skip table of contents

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

com.atlassian.confluence.pages.AbstractPage

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

java.util.Date

The date when the page has been created.



$lastModificationDate

java.util.Date

The date of the last page update.



$exportDate

java.util.Date

The date when the page has been exported.



$creator

com.atlassian.user

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

com.atlassian.user

The name of the user who updated the page to the current version.

$lastModifier.name - Modifier's account name
$lastModifier.fullName - Modifier's full name
$lastModifier.email - Modifier's email


$pageNumber

String (HTML)

The number of the current page in the resulting document.



$siteTitle

String (HTML)

The site's title which will appear on the browser title bar.



$page.tinyUrlString (HTML)The tiny URL of the exported root page.

$dateTimeFormatter


Used to format java.util.Date and org.joda.time.DateTime, for example

  • $dateTimeFormatter.withStyle($exportDate, "MS") (uses a DateTimeFormatter created with DateTimeFormat.forStyle())
  • $dateTimeFormatter.withPattern($exportDate, "ddMMyyyy") (uses a DateTimeFormatter created with DateTimeFormat.forPattern())
  • (info) Available since Scroll PDF Exporter 2.5: $dateTimeFormatter.format('en', $exportDate, 'dd. MMMM yyyy') (uses English language for month names)

Space Information




$space

com.atlassian.confluence.spaces.Space

The space where the page is located.

$space.key - Space key
$space.name - Space name
$space.urlPath - URL path to space

$spaceLogo

String (HTML)

The space logo as HTML. If the download URL of the space logo is required, use $spaceLogo.getSrc()


Export Information




$exporter

com.atlassian.user

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 null (if there are no Comala Workflows in this space).
You may want to use $!adhocState to avoid 'null' printouts.



$baseUrl

String (HTML)

The base URL of the Confluence system.



$globalLogo

String (HTML)

The global Logo of the Confluence system.



$siteTitle

String (HTML)

The site's title which will appear on the browser title bar.



$selectedLabelsString (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 null, if page cannot be found.



$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 null if page cannot be found.


Own Metadata

This section refers to metadata as supported by the Confluence Metadata Plugin. For more information, see Defining Your Own Metadata.


$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:

KeyValue
metadata.Author K15t Software

The metadata macro prefixes all keys with "metadata." to ensure that no other content properties are modified.

You can now access this data in two ways:

  1. $metadata.from("Author")
  2. $contentProperty.from("metadata.Author")

Both do exactly the same, the $metadata placeholder is just a convenient way to use the same keys as done when adding the macro to a page. Internally it simply adds the prefix to the key before looking up a value.




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:


PlaceholderRendered value
$scrollVersions.Version.Idcurrent
$scrollVersions.Version.NameCurrently Published
$scrollVersions.Version.Descriptioncurrently 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.ReleaseDateDateTime

The release date of the exported version.

Should be used together with $dateTimeFormatter (see above) to get correctly formatted dates.

$scrollVersions.Version.ArchivedBoolean

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.

$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:

PlaceholderDescriptionExample
$scrollVersions.Language.KeyThe language key of the exported language.pt_BR
$scrollVersions.Language.NameThe language name of the exporter language.Portuguese (Brazil)
$scrollVersions.Language.LanguageThe language of the exported language.Portuguese
$scrollVersions.Language.CountryThe country of the exported language.Brazil
$scrollVersions.Language.VariantThe variant of the exported language.(This depends on the system and environment of the Confluence Server, usually empty)
JavaScript errors detected

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

If this problem persists, please contact our support.