Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

When using same-space publishing, how can I make viewers see the released document header only?

Edited

I have created a Comala workflow with same-space publishing. However, when the document moves back to draft, the table I display with meta-data using the {pageheader} macro allows viewers to see meta-data in draft states. Is there a way to prevent this? I would like Viewers to see the header of the Published document only, but those working on the draft to see the updated meta-data. 

1 answer

1 accepted

2 votes
Answer accepted

Hi Stephen,

Welcome to the Atlassian Community! I understand that you want to show different versions of metadata depending on if your users are viewing the draft or published versions. 

It is not possible with the pageheader macro and with one variable. However, if there are 2 variables - DraftVariable and PublishedVariable, it is possible to use Draft and Published view in set-message macro.

Once the page is Approved, set-metadata is used to save the ReleasedVariable. In set-message, published view, get-metadata:ReleasedVariable is used and ReleasedVariable is shown.

In set-message, draft view macro, get-metadata:DraftVariable is used and DraftVariable is shown.


Here is an example:

{workflow:name=Simple approval workflow using set message published and draft view|key=com.comalatech.sample.approvals.01|label=message}
{description}
The Simple Approval Workflow has 2 states.
In Progress: Staff edit pages, not visible to non-team members. Approved: Staff approve, visible to public.
{description}
{state:In Progress|approved=Approved|taskable=true}
{approval:Review|assignable=true}
{state}
{state:Approved|final=true|updated=In Progress|hideselection=true}
{state}
{trigger:statechanged|state=Approved}
{set-metadata:ReleasedVersion}@version@{set-metadata}
{set-message:view=published}
Published view
||Released Version |{get-metadata:ReleasedVersion}|
{set-message}
{trigger}
{trigger:statechanged|state=In Progress}
{set-message:view=draft}
Draft view
||Version |{get-metadata:version}|
{set-message}
{trigger}
{workflow}

If I'm not being quite clear here, we do have some older release notes that might help: https://wiki.comalatech.com/display/CDML/5.2+Release+Notes. 

Hopefully this helps, but feel free to reach out to us at support.comalatech.com if we can do more! 

Thank you Mike! This looks like exactly what I need, if I have trouble with this method I will reach out as you suggested :). 

@Mike Rink Do you know if this message functionality will be built into {pageheader}? It is a good workaround for now, but not optimal as messages have styles. 

@Stephen Dawson that functionality is not currently on the roadmap, but I will definitely pass on that feedback to the product team. Best of luck, and let me know if I can help with anything else. 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Confluence Mythbusters: Does Atlassian even use Confluence?

Hi, Confluence collaborators! As part of #Confluence-Collaboratory month, we’ve created a very special Mythsbusters segment, where we're dive into an interesting myth and uncover the truth behind i...

1,367 views 7 28
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you