Topics Map > Documents Tab
KB User's Guide - Documents Tab - IncludeDoc and Dynamic Web Page Content
The IncludeDoc function is available in the KB editor in both the toolbar and under the Insert menu. It allows you to insert sections of other KB documents, news items, or external webpages into your document. It is represented by an icon of a document with a plus sign:
Include Content from Other KB Documents
In TinyMCE, when the IncludeDoc option is clicked, you will be presented with three options:
- Type - The document type to be included; Doc, News, or External page
- Style - Type of include as HTML - Block DIV or Inline SPAN
- Doc ID or URL - ID number of the document or news item, or URL of the external page being included
To edit an existing IncludeDoc tag, click within the tag element, and edit the text as needed. Additionally, the KB include doc button will be highlighted in the editor toolbar. Clicking the button will let you edit additional IncludeDoc properties.
Within the KB, you can either include the entire body of a document, or just include certain sections. See below:
Including the entire body of another KB document
In the TinyMCE editor, click on IncludeDoc button, enter the KB document ID number, then click Insert.
The IncludeDoc will appear differently in the editor as compared to the published or previewed document. In the latter, you will see the entire body of the included document loading where you placed the IncludeDoc. In the editor, you will simply see a reference, which will display as blue text formatted like "include doc #####: Document title". The text will also be preceded with a small gear icon.
For example, an IncludeDoc for doc 14925 will display in the editor like so:
In contrast, when viewed outside of the doc edit screen, you would see the doc body embedded into your own KB document like so:
Including only certain sections of another KB document
If the document you are including has blocks (e.g. paragraphs or divs) that are labeled with IDs, you also have the option to embed one or more specific sections.
To do this:
Click the IncludeDoc button as described above and enter the KB document ID number
In the main editor, enter a hash (#) character and the specific element id directly after the document ID (and before the colon). If you want to pull in more than one element, you can put in multiple element ids separated by a comma.
Note that elements will appear in the same order as the element ids are specified in the includeDoc tag (not in the order in which they appear in the source doc). If none of the elements exist in the source doc, the entire body content will be included. Otherwise, only the matching element(s) will be included.
In the example above, doc 52052 contains sections with the IDs "internal-sound-post" and "violin-image". To include just these elements, you would edit the IncludeDoc as it appears in the editor to read:
When viewed, you would see only those two sections embedded, like so:
The IncludeDoc feature also allows you to embed a publicly-accessible web page into a KB document. Please note that this will import all elements, such as page navigation, so it is primarily intended for cases where you have very simple, unstyled content being output to a web page, and you do not wish to duplicate it in the KB.
To do this:
Click on the IncludeDoc button to open the dialogue window.
Change the Type dropdown to Include external page body.
Paste or enter the desired URL into the External page url field.
Examples of Live Web Pages Embedded Into a KB Document
The data is can be quite lengthy, so they will be presented in their own documents.
Here is an example of an embedded Google calendar: Example Document for Embed Google Calendar: Move To Production Schedule
Here is an example of an embedded wiki document: Sample: Doc 14925 - Wiki page: Maven Information