Variable Reference Guide
Smart variables are dynamic variables that can make your content more flexible. Each smart variable is constructed using a specific syntax called dot notation inside double mustache brackets. It's written as a hierarchy, starting with a top-level object and followed by properties of that object, {{object.property.subProperty}}. Notice that multiword properties use camelCase capitalization.
This {{ }} syntax is Handlebars, so the macro also supports Handlebars' conditionals, loops, and helper functions on top of plain variable interpolation β see the Template Syntax guide for examples.
When you're trying to understand what a particular smart variable might do, it can help to read them in reverse. For example:
{{page.title}} is "the title of the page" (that's relevant to the current page).
Space propertiesβ
{{space.id}}β the ID number that uniquely identifies a space{{space.key}}β the keyword in the URL that serves as a unique identifier of a space. Example:http://confluence.atlassian.com/wiki/spaces/KEYWORD/pages{{space.name}}β the name of the space{{space.type}}β the type of the space ('global', 'collaboration', 'knowledge_base', 'personal'){{space.status}}β 'current' or 'archived'{{space.authorId}}β accountId of the person who created the space{{space.createdAt}}β space creation date and time{{space.homepageId}}β the ID of the space's homepage
Page propertiesβ
{{page.type}}β identifies the type of relevant content as either a βpageβ or a βblogpostβ{{page.id}}β the ID number that uniquely identifies a page{{page.title}}β the published title of a page{{page.status}}β 'current', 'archived', 'trashed', 'deleted', 'historical', or 'draft'{{page.createdAt}}β the date and time the page was originally created
Authorβ
{{page.author.accountId}}β accountId of the person who originally published the page{{page.author.username}}β the username of the person who originally published the page{{page.author.publicName}}β the public name of the person who originally published the page (the name or handle they use in public Atlassian forums like Community){{page.author.displayName}}β the display name of the person who originally published the page (the βFull nameβ in their Atlassian account profile)
Page versionsβ
Reference {{page.currentVersion}}, {{page.previousVersion}}, or {{page.initialVersion}} to pull details about a specific version of the page β no extra configuration needed, the data is fetched automatically the moment you reference one of these paths.
{{page.currentVersion}}β the latest published version of the page{{page.previousVersion}}β the version immediately before the current one{{page.initialVersion}}β the very first published version of the page
Each of these exposes the same set of sub-properties, for example on currentVersion:
{{page.currentVersion.number}}β the version number{{page.currentVersion.createdAt}}β when this version was published{{page.currentVersion.message}}β the version's edit summary/comment{{page.currentVersion.minorEdit}}β whether the edit was flagged as minor{{page.currentVersion.authorId}}β accountId of the person who published this version{{page.currentVersion.author.accountId}}β accountId of the version author{{page.currentVersion.author.username}}β username of the version author{{page.currentVersion.author.publicName}}β public name of the version author{{page.currentVersion.author.displayName}}β display name of the version author
Replace currentVersion with previousVersion or initialVersion to get the same fields for those versions, e.g. {{page.previousVersion.author.displayName}}.
All page versionsβ
{{page.versions.results}} returns the full version history of the page (newest first), for use with an {{#each}} loop β see Loops in the Template Syntax guide.
Extended page dataβ
These are fetched on demand β just reference one of them in your template and the data is included automatically:
{{page.labels.results}}β labels applied to the page{{page.properties.results}}β content properties stored on the page{{page.operations.results}}β operations the current user can perform on the page{{page.likes.results}}β accounts that liked the page
Date and timeβ
These are always available and don't need a space or page prefix:
{{now}}β the current date and time{{today}}β today's date{{yesterday}}β yesterday's date{{tomorrow}}β tomorrow's date