Using PHP in templates
You can use PHP in both page- and content templates using {php} Smarty tag:
{php}
//insert you php script here
{/php}
In case you save a template using PHP code through CMS administration interface, you will get an error message "PHP-tags and functions within templates are not allowed in this site". This restriction is set for security reasons but you can disable it by changing a value allow_php_tags in the file config.php in your website root directory:
# Allow PHP-tags in Smarty templates
allow_php_tags = 1
We strongly suggest to change the setting back to zero when finishing site development.
