Template Engine > Creating templates

Creating templates
A template is a text file used as input by Template Engine. The template may contain static text that is output “as is”, i.e. it will not be processed by Template Engine. The template may also contain Template Engine Language (TEL) syntax that is parsed and processed by Template Engine. See Template Engine language reference for information about the TEL syntax.
You can use any editor or application that can produce text files to create templates. This makes it possible to create templates externally using your favorite editing environment. You can for example create templates in Adobe DreamWeaver. You can also use the built-in text resource editor in Design Center.
##My first template
#set( $name = 'World')
Hello $name
Hello World
You can create a template as a Text template resource in a resource set. You can either create the template using the resource editor, or create the template using your favorite editor and import the template to the resource set. You can also create a template using any editor, and store it on a file system, web server or in a Content Management System (CMS).
Template Engine processing of the template
The text content of a template is parsed by Template Engine for TEL grammar. Syntactically correct TEL grammar is processed by Template Engine, while all non-TEL grammar is written verbatim to the output. The text content can be any valid text characters encoded in any of the supported encoding formats.
Static text output
To output static text from the template, you simply have to enter the text exactly as you want to present it in the output. The textual content depends entirely on the type of output you want to produce. It can be a flat file, html, xhtml, xml, etc. Template Engine does not change static texts in any way. White spaces are output exactly as they appear in the template. The only change that may occur is codepage conversions depending on your settings.
This text will be rendered exactly like this
  This will too
This text will be rendered exactly like this
  This will too
<html>
  <head>
    <title>A Title</title>
  </head>
  <body>
    <p>A paragraph</p>
  </body>
</html>
<html>
  <head>
    <title>A Title</title>
  </head>
  <body>
    <p>A paragraph</p>
  </body>
</html>
 
 
OpenText StreamServe 5.6 Updated: 2013-03-01