KB User's Guide - Documents Tab - IncludeDoc and Dynamic Web Page Content

Publicly available dynamic web pages, or sections of web pages, can be included in KB documents by using the IncludeDoc function. The IncludeDoc wraps the selected document ID number in an anchor tag where class="includedoc". This custom class will then embed the contents of that document, or section of that document, into the host doc. Your KB document will display all updates made to the embedded content.


The IncludeDoc Buttons


The IncludeDoc function is available in the KB editor in:

  • WYSIWYG (What-You-See-Is-What-You Get) Design Editor: includeDoc_WYSIWIG
  • WYSIWYG New Editor:
     IncludeDocNewEditor
  • HTML Editor: includedoc_HTML


Include Content from Other KB Documents

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 WYSIWYG design editor, enter the KB document ID number, highlight that number and then click on the IncludeDoc button. For example, highlighting the DocumentID number of 52052 and clicking on IncludeDoc button, will yield this in your document editor:  IncludeDoc example

  • In the WYSIWYG new editor, click on IncludeDoc button, and then enter the KB document ID number. For example, clicking on IncludeDoc button and entering 52052, will yield this in your document editor: IncludeDocNewEditorImage

  • In the HTML editor, enter the KB document ID number, highlight that number and then click on the IncludeDoc button. For example, highlighting the DocumentID number of 52052 and clicking on IncludeDoc button, will yield this in your document editor: <a class="includedoc">52052</a>

Here is an example of a completely separate KB document about violins embedded into your own KB document via the IncludeDoc feature:

Text from your own KB document: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla eget commodo dui. Praesent a pharetra eros. Donec sit amet pellentesque quam, et malesuada mauris. Praesent nunc lorem, pretium sit amet eleifend sit amet, scelerisque eget neque. Aenean diam sapien, euismod sit amet turpis sed, sodales congue odio. Integer ac elit purus. Duis porta volutpat pretium. Praesent a hendrerit dui. Curabitur a venenatis justo. Mauris at est posuere, pulvinar sem a, ornare nibh. Nulla at ultrices magna. Suspendisse potenti. Quisque tincidunt mi dui, ac commodo massa tempus a. Mauris feugiat cursus leo. Sed mauris velit, semper viverra luctus id, egestas eget est. Curabitur lobortis mi urna, ac aliquet ante feugiat in. Please refer to the Basics of a Violin details below:

The body of a violin must be strong enough to support the tension from the strings, but also light and thin enough to vibrate properly. The body of a violin consists of two arched wooden plates as top and bottom of a box, whose sides are formed by thin curved wooden "ribs." The ribs are reinforced at their edges with lining strips, which provide extra gluing surface where the plates are attached. Animal hide glue is used to fasten the parts together, since it is capable of making tightly fitted joints which do not damp vibrations nor add reflective discontinuities to the vibrating structure.


An internal sound post helps transmit sound to the back of the violin and serves as structural support.


Violinparts.JPG


The body of the violin acts as a "sound box" to couple the vibration of strings to the surrounding air, making it audible. The construction of this sound box, and especially the arching of the top and back, have a profound effect on the overall sound quality of the instrument. The sound-producing system of the violin body includes the top and back (and to some degree the sides, or ribs), the bass bar that is glued to the underside of the top, and the bridge and sound post. In addition to the resonant modes of the body structure, the enclosed air volume exhibits Helmholtz resonance modes.


More text from your own document: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla eget commodo dui. Praesent a pharetra eros. Donec sit amet pellentesque quam, et malesuada mauris. Praesent nunc lorem, pretium sit amet eleifend sit amet, scelerisque eget neque. Aenean diam sapien, euismod sit amet turpis sed, sodales congue odio. Integer ac elit purus. Duis porta volutpat pretium. Praesent a hendrerit dui. Curabitur a venenatis justo. Mauris at est posuere, pulvinar sem a, ornare nibh. Nulla at ultrices magna. Suspendisse potenti. Quisque tincidunt mi dui, ac commodo massa tempus a. Mauris feugiat cursus leo. Sed mauris velit, semper viverra luctus id, egestas eget est. Curabitur lobortis mi urna, ac aliquet ante feugiat in.


Including only certain sections of another KB document

  • In the WYSIWYG design editor, enter the KB document ID number, the '#' character, and a specific element id in the target doc. Then highlight that number, '#' character, and element id and then click on the IncludeDoc button. If you want to pull in more than one element, you can put in multiple element ids separated by ",". For example, highlighting '52052#internal-sound-post,violin-image' and clicking on IncludeDoc button, will yield this in your document editor: ClassicEditorImage, where internal-sound-post and violin-image are element ids in document 52052.

  • In the WYSIWYG new editor, click the IncludeDoc button and enter the KB document ID number, the '#' character, and a specific element id in the target doc. If you want to pull in more than one element, you can put in multiple element ids separated by ",". For example, clicking on the IncludeDoc button and entering '52052#internal-sound-post,violin-image', will yield this in your document editor: ClassicEditorImage, where internal-sound-post and violin-image are element ids in document 52052.

  • In the HTML editor, enter the KB document ID number, the '#' character, and a specific element id in the target doc. Highlight that number, '#' character, and element id and then click on the IncludeDoc button. For example, highlighting '52052#internal-sound-post,violin-image' and clicking on IncludeDoc button, will yield this in your document editor: <a class="includedoc">52052#internal-sound-post,violing-image</a>, where internal-sound-post and violin-image are element ids in document 52052.

The screenshot below shows two sections in document 52052 wrapped in a <div> tag and an id attribute:

Two sections of target document wrapped in a div tag with an id attribute

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.

Here is an example of two sections from a completely different document about violins embedded into your own KB document via the IncludeDoc feature: 


Text from your own KB document: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla eget commodo dui. Praesent a pharetra eros. Donec sit amet pellentesque quam, et malesuada mauris. Praesent nunc lorem, pretium sit amet eleifend sit amet, scelerisque eget neque. Aenean diam sapien, euismod sit amet turpis sed, sodales congue odio. Integer ac elit purus. Duis porta volutpat pretium. Praesent a hendrerit dui. Curabitur a venenatis justo. Mauris at est posuere, pulvinar sem a, ornare nibh. Nulla at ultrices magna. Suspendisse potenti. Quisque tincidunt mi dui, ac commodo massa tempus a. Mauris feugiat cursus leo. Sed mauris velit, semper viverra luctus id, egestas eget est. Curabitur lobortis mi urna, ac aliquet ante feugiat in. Please refer to the violin sound post and image below:

An internal sound post helps transmit sound to the back of the violin and serves as structural support.

Violinparts.JPG

More text from your own document: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla eget commodo dui. Praesent a pharetra eros. Donec sit amet pellentesque quam, et malesuada mauris. Praesent nunc lorem, pretium sit amet eleifend sit amet, scelerisque eget neque. Aenean diam sapien, euismod sit amet turpis sed, sodales congue odio. Integer ac elit purus. Duis porta volutpat pretium. Praesent a hendrerit dui. Curabitur a venenatis justo. Mauris at est posuere, pulvinar sem a, ornare nibh. Nulla at ultrices magna. Suspendisse potenti. Quisque tincidunt mi dui, ac commodo massa tempus a. Mauris feugiat cursus leo. Sed mauris velit, semper viverra luctus id, egestas eget est. Curabitur lobortis mi urna, ac aliquet ante feugiat in.

Editing an IncludeDoc Embedded in Another Document


In the example above, we used the IncludeDoc to embed the contents of a document containing violin details (written in Lorem Ipsum) into a completely other KB document.


Whether in the KB Admin Tools or the Live Site(s), authors with permissions to edit the IncludeDoc will see an Edit this section button in the IncludeDoc.

The image below shows the Edit this section button circled in red and surrounded by the Lorem Ipsum text around the violin image.


Include Dynamic Web Page Content


A Quick Review


  • Relative links only point to a file or a file path (example: /helpdesk/how-do-i-set-up-a-webpage.html or help/articles/how-do-i-set-up-a-webpage.html.

  • Absolute links defines a specific location of the Web file/document including: the protocol to use to get the document, the server to get it from, the directory it is located in, and the name of the document itself. (example: http://www.domain.com/pagename.html)


How To Include Dynamic Content from Other Publicly Accessible Web Sites into your KB Document


Now all three types of urls: absolute, relative with a leading slash and relative without a leading slash are all handled and formulated correctly in an IncludeDoc.


Simply cut and paste the relative or absolute URL into the body of your document, highlight the url and click on the IncludeDoc button. The url is then wrapped in a custom KB class tag that will show the content of the web page in your KB document.


  • In the WYSIWYG Design Editor: embed_url

  • In the HTML Editor: <a class="includedoc">https://veryhelpful.web.content/2embed/into/myKBdoc.org</a>


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.


  1. Here is an example of an embedded public calendar (*.ics):
  2. Sample Doc - University of Wisconsin - Madison Events Calendar: International


  3. Here is an example of an embedded Google calendar using
  4. Example Document for Embed Google Calendar: Move To Production Schedule


  5. Here is an example of an embedded wiki document:
  6. Sample: Doc 14925 - Wiki page: Maven Information






Keywords:Include Wiki Page Content in KB document IncludeDoc calendar ics embed link list document embed implant plant set fix lodge root insert place wiki embedded google calendar   Doc ID:14925
Owner:Teresa A.Group:KB User's Guide
Created:2010-08-24 19:00 CDTUpdated:2021-09-03 14:52 CDT
Sites:KB User's Guide, Social Science Computing Cooperative
Feedback:  6   0