Includes

Includes are used include parts of other documents into your document. The markup specifies the document and element to include, and before the document is shown to the user, the include element will be replaced with the element referred to.

For example, you may wish to show a copyright at the end of each help document you provide. You could copy and paste it in each document, but if the copyright changes (e.g. the copyright year), you have to modify every one of your documents.

Instead, you can place the copyright in a separate XHTML file called copyright.xhtml and assign it a unique identifier, like this:


   <p id="copyright">
      Copyright 2006 My Company. All rights reserved.
   </p>

Then for each document, simply include the copyright paragraph:

   <p>

      This is my document. It should have a copyright at the end.
   </p>
   <include path="my.plugin.id/path/copyright.xhtml/copyright"/>

Before the document is sent to the browser to be displayed, the include element will be replaced by the copyright paragraph.

Where Can I Use Includes?

See below for a list of the document types in which includes can be used. The format of the path element of the include depends on the type of document you're including from. As you can see in the example above, the format for XHTML help documents is "<plugin_id>/<path_to_file>/<element_id>". Refer to the links below for the format for your document type.