CNCat 4.3.3 User Manual
Templates File Format
Template file contains description of one or more templates. Each template has the following format:
{TEMPLATE template_name}
HTML-template code
{/TEMPLATE}
For certain templates the list of used database fields is defined after the name. This option is intended for increasing of efficiency. For instance:
{TEMPLATE newitem (ITEM[item_id, item_title, item_descr, link_url, link_target])}
In this case only fields item_id, item_title, item_descr, link_url, link_target are requested for ITEM variable.
HTML-code of the template can contain the following special elements:
- inclusion of generated HTML-code;
- inclusion of another template;
- variable display;
- condition of the type “if-then”;
- condition of the type “if-then-else”;
- function call (from the limited list).
Note. HTML-code of the template is displayed «as is», except for special elements. It means that all line foldings, space symbols etc. are displayed. If necessary, the whole template can be written in one line.
Below is the detailed description of special elements.
__________
Inclusion of Generated HTML-Code