Page 1 of 1
Can you add raw php code in the template??
Posted: Thu Jun 01, 2006 3:13 am
by netfast
Is it possible to run raw php code inside the template? I know how I can do it with php so can I do it with CMSMS?
ie. I need to display a different header for each page and dont want do do this inside the content
Re: Can you add raw php code in the template??
Posted: Thu Jun 01, 2006 7:03 pm
by Piratos
you can use php in templates only with include
example {include_php file="/pfad/zu/lade_nav.php"}
Re: Can you add raw php code in the template??
Posted: Thu Jun 15, 2006 3:57 am
by nordjohn
it doesn't work...where could I made a mistake...?
thanks!
---
johntvery@yahoo.com
Re: Can you add raw php code in the template??
Posted: Thu Jun 15, 2006 4:04 am
by calguy1000
set 'use_smarty_php_tags' to true in the config.php
and then {php}phpinfo();{/php} will work the way you want it to.
Or you could put your php code into a user defined tag, like:
and then call it with {tag_name} in your code.