[solved]I would like to post PHP Code but Smarty tries to process it as a tag.
[solved]I would like to post PHP Code but Smarty tries to process it as a tag.
Is there a way to post PHP code in my pages without the template system from trying to process it as a Smarty tag?
Last edited by JRSofty on Fri Jun 05, 2009 8:24 pm, edited 1 time in total.
Re: I would like to post PHP Code but Smarty tries to process it as a tag.
wrap it between ...
Ronny
Ronny
-
- Power Poster
- Posts: 424
- Joined: Sat Feb 02, 2008 12:42 am
Re: I would like to post PHP Code but Smarty tries to process it as a tag.
Add it as a User Defined Tags from under the Extensions menu in the admin.
See also: http://wiki.cmsmadesimple.org/index.php/User_Handbook/Admin_Panel/Extensions/User_Defined_Tags
See also: http://wiki.cmsmadesimple.org/index.php/User_Handbook/Admin_Panel/Extensions/User_Defined_Tags
Take a penny, leave a penny.
Re: I would like to post PHP Code but Smarty tries to process it as a tag.
OK... 2 answers for 2 different questions...
Are you trying to SHOW the php, then you can use my post.... If you want to execute PHP in the page, then you should use the second logic, using the UDT...
Ronny
Are you trying to SHOW the php, then you can use my post.... If you want to execute PHP in the page, then you should use the second logic, using the UDT...
Ronny
Re: I would like to post PHP Code but Smarty tries to process it as a tag.
Thanks Ronnie that was what I was looking for to show the PHP.
Re: I would like to post PHP Code but Smarty tries to process it as a tag.
Sadly wrapping it in tags didn't seem to work. I'm getting errors in the item when it is displayed. I keep getting these "unrecognized tag" errors.
Re: I would like to post PHP Code but Smarty tries to process it as a tag.
OK,
then put {literal} {/literal} around it....
Ronny
then put {literal} {/literal} around it....
Ronny
Re: I would like to post PHP Code but Smarty tries to process it as a tag.
That's got it thanks..