Template Engine language reference > Directives > The #include directive

The #include directive
The #include directive is used to import a text file, which is then inserted 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. 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>.
<html>
<body>
  <p>inline content</p>
  #include('./footer.txt')
</body>
</html>
<html>
<body>
  <p>inline content</p>
  <p>My Footer</p>
</body>
</html>
It is possible to include external content using two protocols:
File is default when no protocol is specified. It is useful if the content is available on a local file system or network share. The StreamServer working directory is the current directory. It is possible to specify paths relative to this directory (for example ..\data\templates\mytemplate.txt) or absolute paths (for example c:\mytemplates\mytemplate.txt)
The http method is useful if the content is available on a web server or content management system.
Note:
Examples
#include('./mytemplate.html') ##template in working directory
#include('c:\templates\mytemplate.txt')
#include('http://www.example.com/stylesheet.css')
OpenText StreamServe 5.6 Updated: 2013-03-01