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


## Overview

With same-space publishing, each piece of content (page or blog post) can have concurrent draft and approved versions.

![samespace_publishing_graphic.png](media://e98fcaae-3781-4141-89d6-a3d8626e7abb)

One state in your workflow must be set as a final (published) state.

If the content is in one of the other workflow states, the workflow will see this as a draft state.

![image](media://99e52213-3bce-4018-b97f-4d8d8a9266cd)

In a draft state, a byline link to the latest approved version is displayed if the document has previously been in the final state.

Choosing the byline link displays the last approved content.

![image](media://b7a9c045-60b2-4f55-aab2-f5e3851c63df)

The last approved content version is displayed with a byline displaying the approved content workflow state name and a link to the latest draft content. 

By default, users with Confluence view-only permission for the content see only the last approved version. No workflow byline or breadcrumbs are visible.

![image](media://b387c1d8-4fe4-4ec1-bc68-f1be83282543)

Only a user with edit or admin permission is able to view the draft content and view and access the workflow byline breadcrumbs and workflow state dialog box.

<span style="color: #172b4d">The same-space publishing capability is aimed at organisations using Confluence internally. It can also be used in conjunction with other apps to manage publishing to a </span><span style="color: #172b4d">[different space](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649957805)</span><span style="color: #172b4d"> or a </span><span style="color: #172b4d">[remote space](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649728423)</span><span style="color: #172b4d">.</span>

> ✅ If there is a formal requirement (compliance, organizational policy) that draft updates are not visible to some users, we recommend using [different-space publishing](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649957805) where Confluence permissions can hide the draft space content entirely.

## Activating same-space publishing

To use same-space publishing, just add the `final=true` parameter to one of the [state macros](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649531575) in your workflow. This marks it as the final (published) state.

Edit the state in the workflow builder to make it the **final** state in the workflow.

![image](media://4861fba8-803d-49e8-8b06-8931e6375925)

The addition of the `final=true` parameter changes the behavior of the workflow. A different page version is displayed to a viewer depending on the Confluence permissions of the user.

The workflow's published version of the content is the version created when a transition to the final state takes place. This is the **final state version**.

- Editing content in the final state creates a new version, ***but***
- *The ****final state version**** remains as the version created on transition into the final state*

> ✅ This is why it is good practice to transition out of the final state if the content is changed, for example, by adding an [updated transition](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650120593) to the final state.

## Differentiating draft and published content

Same-space publishing is used to differentiate content in a draft workflow state and the **final state version**.

> 📝 **Same-space publishing is not a secure way to publish content.**

View-only users are directed to the latest **final state version** (if present)**†**

- The workflow byline breadcrumbs are not displayed on this content
- They are not able to navigate to or view content in a draft state

Whilst view-only users default**†** to seeing the approved content (the latest **final state version**), the most up-to-date content is still visible:

- Through the page history or search index
- In the mobile view (rather than the desktop view)[,](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650315581) for some apps that can only display the latest version

 In these cases, a view-only user is not directed to the **final state version, **and draft content can be accessed by a view-only user.

> 📝 †  The app [global configuration](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649889951) and [space configuration](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649956239) - **[Workflow Activity and Drafts Visibility](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649889951)** and **[Internal Page Publishing Configuration](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649956239)** - impacts the users' ability to view content with an applied workflow with a **final** state.

## Subsequent drafts

The **final state version** is created on a transition into the** final** state.

> ℹ️ If the final workflow state content is edited and no transition occurs (for example, there is no `updated` transition present in the state), the content in the final state is a different version from the **final state version,** even though it remains in the final workflow state.

The `updated` parameter can be added to a final state to ensure that any subsequent edits are pushed to a draft state.

In the example workflow below, editing the content when it is in the final state causes a transition to the **Editing** state. The content in the final state **Published** is always the **final state version**.

## State colours

By default,

- **Draft** (unpublished) states have an orange circle > Macro (inline-media-image)
- The** Published** (`final=true`) state has a green circle > Macro (inline-media-image)

For more information, see [State status indicator circles](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650152863).

> ℹ️ State indicator colors can be customized state-by-state using the [workflow builde](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650316391)r or by editing the `color` parameter on the [state macro](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649531575).

## Permissions

If a workflow has a published (`final=true`) state, then all other states in that workflow will be considered draft (unpublished) states.

For example, in a three-state workflow with the following states:

> Macro (inline-media-image)

 **Editing** – draft

> Macro (inline-media-image)

 **Review** – draft

> Macro (inline-media-image)

 **Published** – published (`final=true`) state  


By default, users who only have [view content permission](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650217543) can only see the most recently published version of each page or blog post. If they try to view draft (unpublished) versions, they see an error similar to this

![image](media://997a2da6-6031-4d4f-9ae1-b25a7f840ed5)

The default app configuration allows users with [edit and/or admin permission](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650217543) to view all versions of content, and they can [switch between](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649858126) the latest draft and published versions using the [workflow status bar](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650117676).

> ℹ️ The [URL for the last published content version](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649858126) is different to the URL for the content in a draft state.

## Notifications

The [set-message](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650153597)**[ ](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650153597)**[macro](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650153597) can differentiate between draft and published versions of content.

## PDF and Word export

When exporting content as PDF or Word using native Confluence features, either as [individual pages](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650315435) or an [entire space](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649662664), the distinction between the **published** content versus the **draft** content is respected.

If the **final** state content is edited, but there is no transition, then the

- Content version in the **final** state changes
- Workflow published content remains as the version created *when the last transition to the ****final**** state occurred*

You should include an updated transition in the **final** state to ensure that the current content is the workflow published version.

For more information, see: [Confluence PDF and Word Export](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649530727).

## App configuration

| > Macro (anchor)

Setting | Where | Notes |
| --- | --- | --- |
| **Workflow Activity and Drafts Visibility** | - [Configuration - Space Tools](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649956239)
- [Configuration - Global](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649889951) | This determines which users can access the workflow information and tools on a page. If using the same space publishing, users not in this group will see the approved version of the content by default. |
| **Default View** | - [Configuration - Space Tools](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649956239) | Determines whether published content is seen by default. |
| **Published View Macro Transform** | - [Configuration - Space Tools](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649956239)
- [Configuration - Global](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649889951) | Determines whether `include-page` and `excerpt-include` macros display most recently published (the last version created on transition to the workflow **final state**) content or, regardless of workflow state, the latest version of content for the excerpt source with an applied workflow:<br>- **Enabled** - only display the last approved version
- **Disabled** - display the latest version |
| > 📝 When using other macros, including third-party apps<br>- [Appfire Scaffolding Forms and Templates app](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650315581) - The data is always rendered from the latest version of the source content with the applied workflow, irrespective of the **Published View Macro Transform** configuration
- [Gliffy Diagrams for Confluence](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650348661) - The Confluence `excerpt-include` and `include-page` macros are the only macros that can display the final version content
- [Appfire Multiexcerpt](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649596306) - When the Published View Macro Transform is enabled, the Appfire Multiexcerpt page macro can be configured to use only the last approved version (generated on a transition to the workflow final state).<br>> ℹ️ A feature enabled in both MultiExcerpt and in Comala Document Management, a **MultiExcerpt Include** can recognize the Comala workflow statuses and only include the approved content |