...
Info | ||
---|---|---|
| ||
This routine is available since starting with katl-commons 4.0. |
Syntax
...
executeTemplate(template_path[, charset] )
Description
...
Excerpt |
---|
Executes a template. All variables already defined in the script are passed onto that template. |
...
Returns the string that represents the completed template.
Parameters
...
Parameter name | Type | Required | Description |
---|---|---|---|
template_path | string | Yes | The template path, either absolute or relative. Note that if relative, this path is based on KEPLER_HOME directory, and not to the mail templates directory! |
charset | string | No | Specifies the charset used to read that template |
Return type
...
string
Example
Be given the following templateFollowing template is represented below:
Code Block | ||
---|---|---|
| ||
$! if(isNotNull(baseVar)) { $ Well done, $baseVar$ ! $! } else { $ Nobody to congratulate ?!? Whoaaaa !!! $! } $ |
... and the following scriptFollowing script is represented below:
Code Block |
---|
string baseVar = "Monster"; return executeTemplate("templates/some.tpl"); //note that we refer this relative to Kepler Home directory ! |
... the The output produced is following:
Code Block |
---|
Well done, Monster ! |
See also
...
Filter by label (Content by label) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|