Here is a list of tips and tricks you can use during developing/integrating HostBill templates.
Controlling Smarty library behaviour through config.php file
...
HostBill configuration file (includes/config.php) allows to override some Smarty library settings, without the need to modify underlying library code. Following settings can be overrided:
Security settings → PHP_TAGS (ref: https://www.smarty.net/docsv2/en/variable.security.settings.tpl )
To enable use of Smarty {php} tags, add following to bottom of includes/config.php file:Wiki Markup $config['Smarty.PHP_TAGS']=true;
Trusted directories - to be used with {include_php} tag - (ref: https://www.smarty.net/docsv2/en/variable.trusted.dir.tpl )
To provide array containing list of trusted directories, add to bottom includes/config.php file:Wiki Markup $config['Smarty.trusted_dir']=[ '/path/to/first/trusted/directory/', '/path/to/another/trusted/directory/' ];
PHP handling - how Smarty should react php code (within <?php ?> tags) - (ref: https://www.smarty.net/docsv2/en/variable.php.handling.tpl )
Set value below in includes/config.php:Wiki Markup $config['Smarty.php_handling']=3;
Following values are available:
0 - Smarty echos tags as-is (default)
- 1 - Smarty quotes the tags as html entities
- 2 - Smarty removes the tags from the templates
- 3 - Smarty will execute the tags as PHP code
Template cache
...
Sometimes your changes are not displayed immediately after modifying tpl file. To make it work you can:
...