Versions Compared

Key

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

...

Code Block
languagenone
{trigger:event_name}
   {set-message[:[user=]useruser_name][|group=group_name][|view=both/draft/public][|style=tiperror/warning/info/notesuccess][|duration=duration_value]}
{trigger}

...

Parameters

Mandatory

Default

Description

unnamed first parameter or user

No

Sets the name of the user who can view the message. If no name is specified, then the message is visible to all users. (3)

groupNoSets the name of the group of users that can view the message. If no group is specified, then the message is visible to all users. (3)

style

No

tipinfo

The style of the message that defines the background. Values can be:

  • error
  • warning
  • success
  • info
  • hint

duration

No

Note (1)

Defines for how long the message is displayed. Duration of time before state expires following the ISO 8601 standard for duration. For more settings, please see the Duedate.

viewNoboth

Defines in which view of a page will the message be displayed into. Accepted values are:

  • draft: the message will be shown only in the draft view of the page
  • published: the message will be shown only in the published view of the page (including "/public" in the URL)
  • both: the message will be shown in both draft and published views

A message for draft view, another for both views and one for published view can coexist at the same time for the same page (not more than one of each type). (2)


Info
titleTable Note
  1. For page messages (i.e, no user or group name specified), messages are shown indefinitely. For user
message
  1. and group messages, default setting is to display the message only once per user.
  2. If "view" is used in combination with "user" and/or "group" a message of each type of view can be set for each user (or in the case of groups, each member of the group).
  3. "user" and "group" parameters can be combined, but take into account that there can only be a single message per user.


Examples

To set the message "Draft" visible to all userusers:

Code Block
{set-message}Draft{set-message}

...