Operators
At a moment in templator, there are 10 operators:
- <TMPL_var VAR_NAME> - Direct parameter output.
- <TMPL_if VAR_NAME> <TMPL_else> </TMPL_if> - The condition.
- <TMPL_unless VAR_NAME> <TMPL_else> </TMPL_unless> - The complementary condition.
- <TMPL_loop MODIFICATOR1 MODIFICATOR1 VAR_NAME> </TMPL_loop> - The loop.
- <TMPL_foreach VAR_NAME as ITERATOR_NAME> </TMPL_foreach> - The loop with iterator.
- <TMPL_udf FUNCTION_NAME(PARAMETER1, "text 1", PARAMETER2, "text2")> - User function execution.
- <TMPL_include "file_name"> - Including/inserting other templates taken from the file name in the current one.
- <TMPL_comment> - commentary.
- <TMPL_block BLOCK_NAME> </TMPL_block> - the named block with the code(the analog of in the languages of the programming).
- <TMPL_call BLOCK_NAME> - block execution.
In order to simplify the make-up, we made all operators names case insensitive, that is why the notifications such as: <TMPL_var , <TmPl_VaR , <tmpl_VAR are equal.
In CTPP the names of variables are case sensitive, that’s why for example: <TMPL_var ABC>, <TMPL_var abc>, <TMPL_var Abc> are not in equal state.
Parameter name may be contain latin alphabetical symobls, numbers or underline symbol; first symbol of parameter name cannot be the number.
Attention! Parameters, which names starting with a symbol of underlining (for example __FIRST__) are reserved names and should NOT be used by the developer.
Copyright © 2003 - 2010 CTPP Dev. Team | http://ctpp.havoc.ru