How to publish parent and child pages with Comala Publishing and Comala Document Management

The publish-page macro is used as an action in a workflow trigger to publish content to a different space on the same Confluence Server or Data Center instance.

  • one space is set up as the source space, where content is drafted, developed, produced and approved

  • another space is set up as the destination target space, where the content is published to for wider audience viewing

For more information, see: Different-space publishing

Using this workflow example, it will publish the page to the target space when the page is approved and the state changes to the Published one.

{workflow:name=Different-space publishing} {state:Editing|submit=Review} {state} {state:Review|approved=Published|rejected=Editing} {approval:Review} {state} {state:Published|update=Editing|final=true} {state} {trigger:statechanged|state=Published} {publish-page} {trigger} {workflow}

 Instructions

  1. If you would like to publish parent and child pages you will need to follow this workflow:

 {workflow:name=Approve Children}     {state:Editing|submit=Content Review}     {state}     {state:Content Review|approved=Published|rejected=Editing}         {approval:Review}     {state}     {state:Published|final=true}     {state}     {trigger:statechanged|state=Published}         {set-state:Published|page=@children}         {publish-page}     {trigger} {workflow}

When the page reaches the published state it will change the state of the child pages as well to Published and the parent and child pages will be published to the target space.

The condition added to the set-state macro tells it also to change the child pages to the published state..  {set-state:Published|page=@children}

 Related articles