VARIABLES
In CT++ template engine two types of variables are defined: local and global.
The sense of these two concepts is completely equal with a similar idea in the other algorithmic languages such as C++ & Perl.
For variable output use operator <TMPL_var VAR_NAME>
Example 1.1
Template: "Hello, <b><TMPL_var username></b>!"
Parameter: username => "Olga"
Output: "Hello, Olga!"
You can use user defined functions to make a variable output.
Example 1.2
Template: "<a href="/index.cgi?username=<TMPL_var URLESCAPE(username)>">"
Parameter: username => "Андрей"
Output: "<a href="/index.cgi?username=%C0%ED%E4%F0%E5%E9">"
Attention! You can not use ‘>’, round brackets, space char in the name of function or variable neither start it with an underline char. Only one parameter available in user defined function.
Copyright © 2003 - 2005 CTPP Dev. Team | http://reki.ru/products/ctpp