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
Can you add raw php code in the template?? Topic is solved
Re: Can you add raw php code in the template??
you can use php in templates only with include
example {include_php file="/pfad/zu/lade_nav.php"}
example {include_php file="/pfad/zu/lade_nav.php"}
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Can you add raw php code in the template??
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.
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:
Code: Select all
echo "My Name is Bob";
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.