Skip to main content
MindTouch Success Center

Conditional content for multiple groups

Role required:
Admin
Create custom conditional content blocks to display for multiple groups.

By default, Conditional Content includes a group option that allow you to select a single group. Use conditional content statements for more than one group to be able to see the same content.

Use the OR statement

Include the OR parameter (double straight bars ||) to your statement. For example, members of the Administrators group or the Editors group will be able to see the conditional content with this code:

<div if="user.groups['Administrators'] || user.groups['Editors']">Sample</div>

Use the AND statement

Include the AND parameter (double ampersands &&) to your statement. For example, members of the Administrators group and the Editors group will be able to see the conditional content with this code:

<div if="user.groups['Administrators'] && user.groups['Editors']">Sample</div>

Use the NOT statement

Include the NOT parameter (quotation mark ! )  to your statement. For example, members of all groups except the Administrators group will be able to see the conditional content with this code:

<div if="!user.groups['Administrators']">Sample</div>
  • Was this article helpful?