Closed Zakwil closed 3 months ago
Please use $smarty->assign() instead of accessing tpl_vars directly: https://smarty-php.github.io/smarty/5.x/api/variables/assigning/
Ok I tried $smarty->getSmarty()->append('data', array($vSubkey => $vValue), 1); But the scope of the object is related to the fetch, I do 2 fetch : one with the body of the page and the other with the main structure. And the 1st fetch doesn't modify the object and the 2nd fetch don't have the value.
Ok I saved the variable of the fetched object and pass it to my main object.
In smarty 4 I used a function to modify subkey of tpl_vars, but I tried to transfert this one in a method and I think my reference on $smarty is not working anymore. And the value in tpl_vars is not modified after the fetch
Previous (smarty4) :
New (smarty5) :