|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Mellie Smarty n00b
Joined: 01 Sep 2003 Posts: 1
|
Posted: Mon Sep 01, 2003 11:17 am Post subject: $smarty->_smarty_vars reassignment |
|
|
I use heavily smarty componentized templates, so each template+php can work its job alone. When some such templates are nested they use a shared $smarty. So, sometimes, there is a need to reassign internal smarty vars (like request), for example when there is a need to save the current state of an action whilte another action is performed (e.g a search that shows results with links pointed to a page with authentication, so the user needs to authenticate and go to the place where he was working before it).
Because of the fact that $smarty->_smarty_vars are assigned at the object creation in _assign_smarty_interface, when i restore some of the superglobals variables i need to manually call:
unset($smarty->_smarty_vars);
$smarty->_assign_smarty_interface();
So i wanted to say that it might be useful to code a "public" method for doing this (instead of hacking the object) |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|