Conditional Content for Multiple Groups
- Role required:
- Admin
By default, Conditional Content includes a group option that allows 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
This statement is not compatible with Expert-powered search interfaces.
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
This statement is not compatible with Expert-powered search interfaces.
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>