Topics Map > Documents Tab
KB User's Guide - Documents Tab - Using the Include Doc Feature to Restrict Content
In some cases, you may want to publish a general document, but would like portions of the content viewable only by a subset of your users. While this is not possible within a single document, you can accomplish this by creating a completely separate document with the restricted content and feeding that into the document for general consumption (e.g. the container document in which you will embed your restricted content via the Include doc feature).
Creating the restricted document
-
If you have not done so yet, create a User Access Group where the members are the users who should be able to view the restricted content. See KB User's Guide - Users Tab - User Access Groups for a refresher on creating and managing User Access Groups.
-
Create a new document and enter the desired content into the Body field. Then, select the following settings for your document:
-
Set the Search Priority dropdown to "Exclude from search" (optional). This way, the content you create will only be visible where you embed it, and will not be searchable by itself. Learn more about the "Search priority" setting.
-
Under the Read access setting, choose the User Access Group that contains the individuals who should be allowed to view the content. Learn more about the "Read access" setting.
- Under the Site access setting, check the box for your internal site. Learn more about the "Site access" setting.
-
-
When you are ready, set the Status to "Active" (or choose "Request activation" if you do not have publish rights in your space), then select the Submit button to finish. Make a note of the ID number of your document.
Embedding the restricted document
-
If the document that will contain the restricted content already exists, open it to edit; otherwise, create a new document.
-
Within the body of the container document, place your cursor where you would like the restricted content to appear. Then, use the Include doc feature (found in the editor toolbar as well as under the "Insert" menu) and enter the ID number of your restricted document. Learn more about the "Include doc" feature.
- Make any other desired changes to the container document, then set the Status to "Active" (or choose "Request activation" if you do not have publish rights in your space) and select the Submit button to finish.
End result
When users with read access to the embedded document view the container document, they will see both the contents of the container document, as well as the contents of the document you embedded with the "Include doc" feature. All other users will see only the contents of the container document; the restricted section will simply not appear.
Note that when the container document is viewed by any user, the container document AND the embedded document will be counted in your document Stats.
Will the restricted content show up in the source code of the container document?
No—Include doc content that has a read access restriction applied does not load on the page for unauthorized users, even if they try looking at the source code (e.g. they use their browser's "Inspect" tool).
The image below shows the HTML source code for a document that has a restricted document embedded between the list of links and the "Make it a great fishing season by" section. As you can see, there is no indication of an embedded document.