If you're using Comala Document Management to add workflows to your pages, you can use multiple placeholders to refer to 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:
Placeholder |
Type |
Description |
---|---|---|
$currentState.Name |
|
The name of the current state of the page. |
$currentState.Description |
|
The description of the current state of the page. |
$currentState.ContentVersion |
The page revision that the state refers to. |
|
$currentState.Published |
Returns |
|
$currentState.UserName |
|
The name of the user who assigned the current status. |
$currentState.Date |
|
The timestamp of the date the page got the current state. |
$currentState.Comment |
|
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:
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