Global functions
- {print_content} - defines content area in the page template where a content template is included. The content template is either choosed in the section editor or pre-defined in the page template (sample: {print_content tpl="mainmenu"})
- {get_fields} - allows to display the fieldnames of the specific database tables. 3.3.1
- {insert_header}, allows to send different HTTP header during page loading (eg when creating wap-pages).
Deprecated tags:
- {print_menu} - prints the default vertical menu which consist section from levels 2-4.
- {print_topmenu} - prints default horizontal menu which consist section from level 1.
- {print_header} - prints default header article which is one of a system article.
- {print_footer} - prints default footer article which is one of a system article.
- {print_navbar} - prints default location bar, which displays full path of user's navigation in your site.
- {print_comments} - prints default comment board.
Additional parameter "targeturl" added since version 3.3.1 .
{print_comments targeturl=http://www.neti.ee}, which defines the page where user will be sent after submission. - {print_box} - Prints add-on boxes.
- {print_users_form} - prints user profile fields table. 4
For more details please refer to Deprecated tags page.
{print_content}
Print_content prints content templates (articles, articles in 2 column etc.) based on either editor selection or value given to parameter "tpl". Editors can select content templates in the section editor dialog window.
Parameters
- tpl - name of the template. Values can be:
- Names of custom SAPI templates
- Names of built-in templates - 1 column, 2 column, news, headlines, documents, gallery, forum.
This functionality is deprecated in version 4, please use SAPI templates in Saurus4 extension instead. - <parameter1> - custom parameter name. Variable name and value pair to pass from page template variables to the content template. 4.2.4
- <parameter2> - custom parameter name. 4.2.4
The priorities for choosing content template into the content area are following:
- parameter "tpl" in tag {print_content}
- parameter "c_tpl" in the URL
- content template selection in the section editor
- master content template (default template choice for all cases)
- built-in default template (deprecated in version 4)
Example
{* print Custom SAPI template named "My template" *}
{print_content tpl="My template"}
Example: how to transfer variables between page and content template
{* In page template: *}
{print_content var1="var1value" var2=$myvariable}
{* In content template: *}
var1: {$var1}
var2: {$var2}
{get_fields}
{get_fields name="fields" table="users"}
{foreach from=$fields item=field}
{$field}
{/foreach}
{insert_header}
{insert name=header content="Content-Type: text/vnd.wap.wml"}
RSS