Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Excerpt
hiddentrue

Using the view parameter of the

{

set-message

}

macro to display a different metadata when users view the draft or published versions

If you want to show different versions of metadata depending on if your users are viewing the draft or published

  versions

versions when using same-space publishing you can use the view parameter of the 

{message} macro

message macro together with a metadata variable.

The value of the metadata ReleaseVersion is set when the transition to the Approved state occurs using the set-metadata macro.

Workflow template

theme
Code Block
RDark
{workflow:name=Using set message published and draft view}
    {description}
        The Simple Approval Workflow
    {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}
        {set-message:view=draft}
        Editor 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}



Related Pages

First trigger

The published content will display displays the view=published message on the public URL for the content

  • <hostname>/display/public/<spacekey>/<pagename>

Image RemovedImage Added
(info) A

A user with edit permission viewing content in the Approved state

will

, by default, does not see the public URL content. 

To avoid this confusion, the first trigger has a second set-message action to cater for to this scenario so that a user with edit permission will see sees a message in the Approved state.

Image RemovedImage Added

Second trigger

The draft content will display displays the view=draft message. 

Image RemovedImage Added