Documentation >> Conditionals >> Messages >> msg.label >> msg.label.access
Message Conditional Macro: msg.label.access
Operators:
- == (equal to)
- != (not equal to)
- greaterThan
- greaterThanOrEqualTo
- lessThan
- lessThanOrEqualTo
Usage Notes
- Tests the access property of the label assigned to the current message, comparing it with the |conditional value| on the right side of the |conditional operator|.
- The access property of a label can only have one of three possible values: Everyone, Members, or Editors. Those are the values that you should provide on the right side of the operator.
- Comparisons such as greater-than and less-than are based on the 'restrictiveness' of the access property. More restrictive is a higher value, so "Editors" is greater than "Members", and "Members" is greater than "Everyone".
- It's important to remember that label-based access control has no affect on some other pages. For example, a published (URL-bound) message with a high access setting will not be visible by guests in the discussion group, but the published (URL-bound) page will still be visible. However, if you were to wrap your URL-bound page in this conditional, you could extend your security from the DG into the URL-bound pages, because this conditional macro will work the same in either location.
Examples
In this example, the first line will be seen because this message (and all of Conversant's documentation) is available to everyone. If you were to copy this example into another message that had a higher access (security) rating, one of the other lines would be shown.
<!--#if condition="msg.label.access == 'Everyone'"-->
1. This message can be seen by anyone.
<!--#elseif condition="msg.label.access == 'Members'"-->
2. This message can only be seen by recognized members.
<!--#else-->
3. This message can only be seen by recognized editors.
<!--#endIf-->
See the above code in action, here:
1. This message can be seen by anyone.
View in DG
|