---
title: "Different-space publishing"
canonical: "https://support.appfire.com/space/CDML/649957805/Different-space%20publishing"
format: markdown
---
> Macro (aura-html)


## Activating different-space publishing

There are two steps to setting up different-space publishing:

1. [Configure the Comala Publishing app](https://appfire.atlassian.net/wiki/spaces/AHP/pages/649758232) to connect the draft and public spaces – see also: [How Comala Publishing works](https://appfire.atlassian.net/wiki/pages/createpage.action?spaceKey=AHP&title=How%20Comala%20Publishing%20works)
2. Update your workflow to trigger the publishing process (see below)

## Workflow markup

The publishing is triggered by an action macro, [publish-page](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650119708), which must be used in a [trigger](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649859133).

```plaintext
{workflow:name=Different-space Publishing}
   {state:Editing|submit=Review}
   {state}
   {state:Review|approved=Published|rejected=Editing}
      {approval:Review|assignable=true}
   {state}
   {state:Published|final=true|updated=Editing}
   {state}
   {trigger:statechanged|state=Published}
      {publish-page}
   {trigger}
{workflow}
```

> ℹ️ The example markup above is based on the example from [same-space publishing](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649794062), but we've added the [trigger](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649859133) at the bottom.

When the state changes to **Published**, the trigger is activated and the `publish-page` macro instructs the Comala Publishing app to synchronize the published content with the other target space. In the example, we have simply chosen to publish the draft space **Published** state content when the workflow changes to this state.

For different-space publishing, all the work is done by the `publish-page` macro. The `publish-page` macro can be used to publish the content from any state using an appropriate trigger event.

## Space publishing and the last approved workflow final state version

The Comala Publishing app can also be configured to only [publish the last approved workflow final state version](https://appfire.atlassian.net/wiki/spaces/AHP/pages/649826124) when a space administrator **publishes the whole space** using the **Publish** option in the space publishing dashboard.

The **Use final state version** space publishing option can be set together with an applied workflow and a [publish-page action macro](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650119708) trigger to publish a document when the workflow transitions to the final state.

> 📝 Using these two publishing configurations in the same space means that
> 📝 
> 📝 - Page editors publish the latest approved final state version for each page
> 📝 - Space administrators publish the latest approved final state version when publishing the whole space
> 📝 
> 📝 You can also prevent any other publishing by a page editor by disabling the app’s **[single-page publish](https://appfire.atlassian.net/wiki/spaces/AHP/pages/650153552)**[ option](https://appfire.atlassian.net/wiki/spaces/AHP/pages/650153552) for the space.

## Macros

> Macro (contentbylabel)

## Examples

> Macro (contentbylabel)

## Related pages

**Comala Publishing app**

- [https://appfire.atlassian.net/wiki/spaces/AHP/pages/649563006](https://appfire.atlassian.net/wiki/spaces/AHP/pages/649563006)
- [https://appfire.atlassian.net/wiki/spaces/AHP/pages/650348491](https://appfire.atlassian.net/wiki/spaces/AHP/pages/650348491)
- [https://appfire.atlassian.net/wiki/spaces/AHP/pages/649826124](https://appfire.atlassian.net/wiki/spaces/AHP/pages/649826124)