![]() |
Parsing PHP in the templates
Is it possible to parse PHP code in the templates? I don't mean just using includes. I realize you can do that with Smarty. I mean something that would require 5-10 lines of code to be parsed.
|
|
Thanks mocara. It's been a while since I messed with Smarty. The {php} tag works pretty well. I'll have to have a deeper look through the manual.
|
Code:
{php}func_print_r($this->_tpl_vars);{/php} Full list of smarty variables/arrays without debug console, yay! :) also you can use $GLOBALS to grab any other data you may need. :wink: :idea: Another tip is open up some files in templates_c/ and you can see how smarty converts it all into php anyway. |
All times are GMT -8. The time now is 10:17 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.