Display conditional content based on reader logins

Even in public knowledge bases, you can restrict some content so that it is only visible to specific readers. To do so, create a reader group or groups and then restrict the category or individual articles to that group.

How does restricted content work?

Readers must be logged in to see content that is restricted. When content is restricted:

  • Only readers who belong to the restricted group(s) will be able to see the content in the Table of Contents
  • Only readers who belong to the restricted group(s) will see the content in Search Results
  • Readers who do not belong to the restricted group will get a "You don't have access to view this" page if they enter the direct URL for the content

Restrictions can be set:

  • At the category level: restrictions set here will automatically cascade to all articles or sub-categories as long as those sub-categories and articles have "None / Inherit" selected.
  • At the article level: restrictions set here apply only to the individual article and don't impact other articles or categories in any way 

Restrict access based on Reader Groups

  1. If you do not have your reader groups set up, you will need to set them up by following these instructions
  2. Create a new category or article (or edit an existing one by clicking on the wrench icon to the right of any content) inside Knowledge Base > Articles.
  3. In the edit view for the category or article, select the Reader Groups should be able to view this content under Restrict to Groups in the right-hand column:
  4. Click Save.

If more than one group is selected, does a reader need to belong to all or only one of the groups?

This depends on your knowledge base's settings. Two Reader Group Logic options are supported:

  • Inclusive:
    • Example: An article is restricted to groups "Apples" and "Bananas". The article can be viewed by any reader in groups "Apples" OR "Bananas".
  • Exclusive:
    • Example: An article is restricted to groups "Apples" and "Bananas". The article can only be viewed by a reader in groups "Apples" AND "Bananas".

By default, all knowledge bases are set to Inclusive Reader Group Logic. You can check or update this by going to Settings > Security and checking the Reader Options section: