Conditional Content for Specific Users
- Last updated
- Save as PDF
Conditional content displays text only to users that belong to a specified subset of your user pool. Conditional content types do not apply when editing the page.
By default, there are four Conditional text types in the Editor:
- Pro Member
- Community Member
- Anonymous user
- Group
You can also create custom conditional text blocks for specific groups.
Add conditional content to a page
- Open a page in Edit mode.
- Place the cursor where you want conditional content, or highlight the content you want to make conditional.
- In the Editor toolbar, select Style.
- Choose one of the conditional text options:
- Conditional text (anonymous only)
- Conditional text (community member only)
- Conditional text (pro member only)
- Conditional text (group only)
- The conditional content container appears and is an editable field.
- If you select Conditional Text (group only):
- Click None in the conditional block header to trigger the drop-down menu for Select a group and select your desired group name.
- To change the target group:
- Click the group name in the conditional block header to trigger the drop-down menu, and change the selection.
- Click Save.
Change or remove conditional content
Conditional content containers function as a toggle.
- To change the target subset of users, highlight the text, and select a different conditional content type from the Style menu.
- To remove conditional content, highlight the text, and re-select the active conditional content type.
- Use Shift+Enter to create a new line below the conditional content block.
How search engines handle conditional content
Public search
Public search engines such as Google and Bing can only find content that is publicly available. Content that you include as conditional for Community Members, Pro Members, or Group-specific users will not be available to these search engines.
Expert Search
All results that are provided by the Expert search algorithm include conditional content when viewed by an authenticated user. Compatible search interfaces include, but are not limited to:
- Intelligent Search
- Search-in-Place Touchpoint
- Enterprise and Federated Search Integrations
- SAP Knowledge Central
- Expert for Genesys Cloud
- Expert for Salesforce
- Expert for Zendesk
- APIs
Conditional content applied via custom DekiScript
Not all conditional content is compatible with the Expert search algorithm.
Conditional content that is applied using the editor toolbar is always compatible; however, conditional content applied by custom DekiScript must adhere to the following rules:
- DekiScript can only make one type of match, either group(s) or user type
- Example group(s) match:
user.groups['support']
- Example user type match:
user.seated
- Example group(s) match:
- DekiScript cannot use AND or NOT operators (only OR is allowed)
- ✔️
user.groups['support'] || user.groups['marketing']
- ❌
user.groups['support'] && user.groups['marketing']
- ❌
!user.groups['engineering']
- ✔️
- DekiScript blocks cannot be nested (conditional content inside conditional content)
Use cases
Use conditional content whenever you need to control who sees what information on a page:
- Internal users need access to proprietary information
- Technical notes should only be seen by your support team
- Editors need to "hide" information until it is vetted
When using Section Editing for a heading placed within a conditional content block, you must ensure that the block is not a direct child of a parent HTML element. Otherwise, the section will not have the option to Edit.