The #include directive is used to import a resource into the location where the
#include directive is defined. The contents of the file is not parsed for TEL grammar. This is useful if you want to include some static boiler-plate content in your output, for example a header or footer that is shared by several templates. If you want Template Engine to parse the contents of the file you must use the
#parse directive (see
The #parse directive).
The table below shows an example where the file footer.txt is imported to the template using the
#include directive. The content of
footer.txt is
<p>My Footer</p>.
File is default when no protocol is specified, and is used if the content is available on a local file system or network share. You can specify absolute paths or paths relative to the StreamServer working directory.
This protocol is used if the content is stored as resources in the runtime repository. See
Resource output connector in the
Connectors documentation or
Resource filter in the
Design Center documentation for information about how to store the resources.
Template Engine can use the #include directive to include the resources in the output. For example, a StoryTeller document can be wrapped into the output delivered from Template Engine. To reference a resource you can use the GUID of the resource or the name given to the resource (specified in the Resource connector/filter).
This protocol is used if the content is an OpenText Media Management (OTMM) asset. To be able to use the otmm protocol you must first create a Media Management connection profile (see the
Profile configurations documentation). When you have the connection profile you can reference an asset using the following syntax:
Where <reference> is either the path to the resource or an ID attribute reference (
?id=<GUID of resource>), for example
?id=9E664C0E-807F-024C-8885-659C6EC6E9C8.
The #include directive is used to include text resources. To be able to use the
#include directive to include binary data, binary resources must be Base64 encoded.