Page 1 of 1
Embedding PHP into template?
Posted: Thu Jul 26, 2007 10:05 am
by ahmednuaman
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.
Re: Embedding PHP into template?
Posted: Thu Jul 26, 2007 10:24 am
by Zoorlat
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)
Re: Embedding PHP into template?
Posted: Thu Jul 26, 2007 5:34 pm
by ahmednuaman
Fantastic! Thanks for that!