This site has moved to the integrated Appfire documentation and information site for our apps.

From February 2024 this site is no longer updated.

Take a look here! If you have any questions please email support@appfire.com

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Overview

Use the {set-message} macro to display an on-screen message. It's great for keeping the user informed during the content production process.

  • Messages are shown between page title and content whilst viewing content (it's hidden from the edit screen)
  • If triggered by stateexpired or taskexpired  Events, the message won't be shown until the page is refreshed

Where to use it?

Optional.

One or more {set-message} can be put in a {trigger} macro.

Parameters

Parameter

Required

Default

Notes

Ver

unnamed first parameter



DEPRECATED Use the user parameter instead

Deprecated
5.2
macro body

The message to display:


Replaces existing message to same audience; if empty, the message panel will be removed for that audience.

duration


(info)

How long should the message be displayed from the point at which it is set?


(info) Default behaviour depends on message audience:
  • Unfiltered messages are shown indefinitely
  • If a group and/or user is specified, the message for an individual user will expire once viewed by that user

In both cases, specifying a duration will override the default behaviour.

group

unfiltered

Only show to users in specific user group(s)?

Filter by label

There are no items with the selected labels at this time.

5.2

style


info



Message style: info, error, warning, success

if no style is added the default message display is info.

4.1

OBSOLETE The tip and hint styles are no longer supported (since v4.1) – use success and info, respectively, instead.

user

unfiltered

Only show to specific user(s)?

Filter by label

There are no items with the selected labels at this time.


view
both

Which types of content URL should the message be shown on?

  • draft – the normal URL
  • published – the /public URL
  • both – both normal and public URLs

Filter by label

There are no items with the selected labels at this time.

5.2

This parameter determine which URL the message will be shown on when using Same-space publishing:

If you're not using same-space publishing, all users see the normal URL by default.

(info) Notes

  • The user and group parameters can be used together:
    • Groups are treated as if you listed their users via the user parameter
    • There can be only one message for a given user per view type
  • Unfiltered messages, those which do not specify user or group, are treated separately:
    • They will be shown in addition to user or group messages
  • Use the macro body empty to remove the previously set message. Note that you need to use the same parameters that in the message you want to remove e.g., if the message contained view=draft, then, your empty set-message macro must have the very same view=draft param.

Example

{workflow:set-message test}
   {state:Ready}
   {state}
   {state:Test}
   {state}
   {trigger:statechanged|state=Test}
      {set-message}
         This message shown to everyone
      {set-message}
      {set-message:user=@user@}
         You transitioned to the {{Test}} state
      {set-message}
   {trigger}
   {trigger:statechanged|state=Ready}
      {set-message}{set-message}
   {trigger}
{workflow}

All examples

See also

Workflow Authoring Guide:

  • No labels