I am currently in a template and need {php} to read something from a model / database. Now it will be a new flexible variable in the current template. How to solve this?
eg:.
{php} $var["newSmartyVar"] = model_gimme_data(); $currentTemplate->assign($var); {/php} The value is {$newSmartyVar} !
What is the correct code here?
(Yee, unusual, not abstract, but needed only for rapid prototyping. The code will later appear in the controller.)
source share