Breadcrumbs

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 specific workflows 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:

Placeholder

Type

Description

$currentState.Name

String

The name of the current state of the page.

https://k15t.jira.com/wiki/s/-1089340325/6452/b918cef7e880658f8bd9548f8f909a3bb00f5478/_/images/icons/emoticons/information.png This placeholder returns the same value as $adhocState.

$currentState.Description

String

The description of the current state of the page.

$currentState.ContentVersion

Integer

The 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

String

The note inserted on the status change.

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

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

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

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

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

Placeholder

Type

Description

$workflow.Name

String

The name of the current workflow.

$workflow.Description

String

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

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

If you want to refer to the active workflow:

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