Forums / Cotonti / Support / PHP code in .tpl

how to insert php code into tpl files

Trustmaster
#35027 2012-07-27 19:45

There is no way to include PHP files from a template and there will not be for security reasons. If you need a way to include the output of a PHP script in your template, then you should create a plugin that would wrap that PHP script and assign TPL tags, or at least assign its output to some global variable. You can place the PHP code directly into 'themes/your_theme/your_theme.php' file but still it must assign the HTML output to a global variable rather than echoing it.

May the Source be with you!