Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Contents

Table of Contents

Template Language

The template language need appeared in early versions of SIL™. Creating real mail templates was not very easy, and the SIL™ programmer had to resort to all kind of artificial constructs for that. Especially, repetitive constructs were hard to embed in the body of the mail, and they needed to be built in the script before inserting them into the mail, with all necessary escapes, making the process of sending that mail cluttered.

...

That being said, STL (SIL Template Language) should not be confounded with C++ STL (Standard Template Library). They are different beasts.

How It Works 


The idea of the STL is simple:

...

The technique is resembling the JSP (Java Server Pages) technique.

Syntax

The syntax used is backward compatible with the previous versions of templates, so you can expand the use of STL immediately over your old templates.

...

Code Block
titleSTL Example
<html>
<body>
Hello $reporter$ from $custName$, the sender $sender$ announces you that the assignee for issue $key$ is $assignee$ and that work has started
$!
//this is a simple script, not carrying too much meaning, but just used as an example.
for(number i = 0; i < 3; i++) {
    $
    <p>
        Hooray!
    </p>
    $!
}
$
</body>
</html> 

How To Use Them

The scripting usage is simple. You can use STL to create template emails or directly in your programs you may call the executeTemplate() routine to parse and execute a template.

...

Child pages (Children Display)
excerpttrue
excerptTypesimple

How Do I Edit Templates ?

You can access your templates from the SIL Manager page, by selecting the Kepler Home tree view:

...

Note

As of now, the SIL Manager does not have proper support for checking the STL syntax. We're working on it, but it may take a while 


For The Technical Minded

In the backstage, SIL defines 3 internal routines:

...