Overview
Conditions allow you to specify additional prerequisite requirements for Triggers and some Transitions.
They are a set of optional parameters which can be added to the macros (listed below) to impose additional limits on when the macro will be active.
In addition, due to support for Value References, you can even create your own custom conditions by comparing metadata values.
Basic example
{workflow:name=Conditions} {state:Editing|approved=Done|rejected=Editing} {approval:Review|permission=administer|assignable=true} {state} {state:Done|final=true|updated=Editing} {state} {workflow}
In the example above, only an administrator can review the content.
Compatible Macros
Note: If a macro has a parameter of the same name as a condition, the parameter – and documentation for that parameter on the macro page – takes precedence.
Content by label
There is no content with the specified labels |
Conditions
Condition | Value | Notes | Ver |
---|---|---|---|
A specific value, of valid type for the value reference.
| Does the value of a value reference match the specified value?
Content by label
There is no content with the specified labels | ||
Warning: If used in a {trigger} macro that's listening to the pageupdated event, the trigger will not be activated if the referenced value is still being updated. | |||
| A comma-separated list of group names
| Is the current user a member of one or more of the specified groups?
Content by label
There is no content with the specified labels | |
When applied to the {approval} macro, you can prefix the list (not items in the list) with & (ampersand) to mandate that all users in the groups defined by the list must take part in the content review. | |||
| Name of an | Has an
Content by label
There is no content with the specified labels | |
When applied to an {approval} macro in a {state} with multiple {approval} macros, this enables you to create nested approvals. Just make sure the {approval} you are referring to is defined prior to where the condition is used. | |||
| A comma-separated list of content labels. | Does the content have one or more of the labels specified?
Content by label
There is no content with the specified labels | |
| Title of required ancestor page.
| Does the current page have a parent or ancestor page of the specified page title?
Content by label
There is no content with the specified labels | |
|
| Is this page set as the space home page?
Content by label
There is no content with the specified labels See also: How to set space home page | |
|
| Did the content editor uncheck the "Notify watchers" checkbox (indicating a "minor change") before updating the content?
Content by label
There is no content with the specified labels | |
This condition can only be used on the {trigger} macro when listening to the pageupdated or newsupdated events. | |||
|
| Is the page an orphan (no parent page)?
Content by label
There is no content with the specified labels | |
| A comma-separated list of content labels. | Does the parent (or any ancestor pages) have one or more of the labels specified?
Content by label
There is no content with the specified labels | |
|
| Does the user have the specified permission for the content?
Content by label
There is no content with the specified labels See also: Roles and Permissions | |
† Irrespective of additional view restrictions resulting from Publishing ‡ Additional administrators can be defined via the | |||
| A space key.
| Is the page or blog post in the space defined by the space key?
Content by label
There is no content with the specified labels Note: The space key is usually shown in URLs, or on the Space Tools → Space Overview screen. | |
| A {state} name. | Is the workflow for this content currently in the named {state}?
Content by label
There is no content with the specified labels | |
| A {state} name. | Is there an unpublished version of this content in the corresponding Draft Space?
Content by label
There is no content with the specified labels | |
Note: This condition requires the Comala Publishing app to be installed. | |||
| Content title.
| Does the content (page or blog post) have the specified title?
Content by label
There is no content with the specified labels | |
| Comma-separated list defining one or more users via their username or user groups.
| Is the current user one of the users listed? Note: You can include
Content by label
There is no content with the specified labels | |
When applied to the {approval} macro, you can prefix the list (not items in the list) with & (ampersand) to mandate that all users in the groups defined by the list must take part in the content review. | |||
usersdefined | Comma-separated list of Value References | Does the value reference define users? This is useful when using
Content by label
There is no content with the specified labels | 4.1 |
Negation
Conditions are compared to values. Values can optionally be negated with a !
(pling / exclamation mark) symbol:
{...|condition=value|...} -- value must match {...|condition=a,b,c|...} -- one or more of the values must match {...|condition=!value|...} -- value must not match {...|condition=!a,b,c|...} -- none of the values must match
Examples
There is no content with the specified labels