Use conditional content to restrict content to only certain users. Conditional content can personalize the experience for your users and provides a mechanism to control access to sensitive information.
When to use conditional content
Use conditional content whenever you need to control who sees what information on a page, as in the following examples:
- Internal users need access to proprietary information on a page.
- Technical notes should only be seen by your support team.
- Editors need to "hide" information until it is vetted.
Conditional Content cannot be displayed in a Contextual Help window.
How search engines handle conditional content
Search engines (including the MindTouch search engine) can only find content that is publicly available. But even if your site is public (which we recommend so your site can get indexed and ranked by web search engines), conditional content allows you to control down to a paragraph what search engines can index and display on their search engine results pages (SERPs) to anonymous users.
Search engines cannot see any content you conditionalize for community members or pro members (since both have to be logged in to either view or contribute).
How to display content to only certain users
Perform the following steps to conditionalize content on a page:
- Navigate to the page on which to add conditional content and open the page in Edit mode.
- From the Editor toolbar, select the Style and choose one of the following options, depending on who should see the content:
- Conditional text (anonymous only)
- Conditional text (community member only)
- Conditional text (pro member only)
- Enter your text inside the conditional text container.
- Click Save.
How to remove conditional content
- Navigate to the page from which you want to remove conditional content.
- Open the page in Edit mode.
- Highlight the conditional content.
- Open the Styles menu.
- Click the highlighted conditional content style.
Apply a style again to restores the content to its original state. Learn how to create custom conditional text blocks for specific groups.