Embedding PHP into template?
-
ahmednuaman
Embedding PHP into template?
Now we all know about the problems with different browsers and CSS. Normally, I'd use PHP to overcome these issues by having browser specific CSS. In CMSMS, how can I embedded custom PHP into the master template? I tried adding a little PHP string into the main template on my site via the admin, but it wasn't parsed as PHP.
-
Zoorlat
Re: Embedding PHP into template?
ahmednuaman,
Use a smarty-tag. Put your code directly between {php} and {/php}.
Also, in config.php, make sure the parameter $config['use_smarty_php_tags'] is set to 'true'
If you want to reuse your script in more places, consider creating a user defined tag (http://wiki.cmsmadesimple.org/index.php/User_Handbook/Admin_Panel/Extensions/User_Defined_Tags)
Use a smarty-tag. Put your code directly between {php} and {/php}.
Also, in config.php, make sure the parameter $config['use_smarty_php_tags'] is set to 'true'
If you want to reuse your script in more places, consider creating a user defined tag (http://wiki.cmsmadesimple.org/index.php/User_Handbook/Admin_Panel/Extensions/User_Defined_Tags)
