how to insert php code into tpl files
GHengeveld |
|
---|---|
The only way to execute php code directly from a template file is to use a callback function. You can call any php function from your tpl, both built-in and custom functions. The return value will be displayed in the HTML, which means the callback should return a string or a number, or nothing at all. You can use a callback function like this: {PHP|my_function('param1', 'param2')} Alternatively, you can combine it with a template tag or php variable: {MYTAG|my_function()} {PHP.somevariable|my_function()} More info: http://www.cotonti.com/docs/ext/themes/cotemplate_advanced |