Skip to main content
Skip table of contents

Using Comala Document Management Placeholders

If you're using Comala Document Management to add workflows to your pages, you can use multiple placeholders to refer to the specific workflow status information of your root page or the workflow assigned to it.

Available placeholders for the page status

For the page state the following placeholders are available:

PlaceholderTypeDescription
$currentState.Name
String

The name of the current state of the page.

(info) This placeholder returns the same value as $adhocState.

$currentState.Description
StringThe description of the current state of the page.
$currentState.ContentVersion
IntegerThe page revision that the state refers to.
$currentState.Published
Boolean

Returns true if the page is in public status.

$currentState.UserName
String

The name of the user who assigned the current status.

$currentState.Date
java.util.Date

The timestamp of the date the page got the current state.

$currentState.Comment
StringThe note inserted on the status change.

The placeholders must  be defined in your template using Velocity. For example:

Returns the user name of the Confluence user who assigned the current state to the page

CODE
#set($currentState = ${workflowsHelper.stateForPage($page.Id)})
#if ($currentState)
    $currentState.UserName
#end

If you want to refer to the last published state, you have to change your variable:

Returns the user name of the Confluence user who assigned the last published state to the page

CODE
#set($publishedState = ${workflowsHelper.stateForPage($page.Id, true)})
#if ($publishedState)
    $currentState.UserName
#end

If you've defined to only export pages in Comala Document Management status Publish:

Returns the user name of the Confluence user who assigned the state to the last published page

CODE
#set($state = ${workflowsHelper.stateForPage($page.Id, $isPublishedOnly)})
#if ($publishedState)
    $currentState.UserName
#end


Available placeholders for the workflow

Besides page specific information you can also use workflow specific placeholders:

PlaceholderTypeDescription
$workflow.Name
StringThe name of the current workflow.
$workflow.Description
StringThe description of the current workflow.
$workflow.LabelName
String
$workflow.Active
Boolean Returns true if the workflow is active.

The placeholders must  be defined in your template using Velocity. For example:

Returns the description of the current workflow

CODE
#set($workflow = ${workflowsHelper.workflowForPage($pageId)})
#if ($workflow)
    $workflow.Description
#end

If you want to refer to the active workflow:

Returns the description of the current active workflow

CODE
#set($workflows = ${workflowsHelper.activeWorkflowsForPage($page.Id)})
#foreach($workflow in $workflows)
    $workflow.Description
#end
JavaScript errors detected

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

If this problem persists, please contact our support.