 |
Smarty
The discussions here are for Smarty, a template engine for the PHP programming language. Dedicated server web hosting provided by Guru-host.eu. |
| View previous topic :: View next topic |
| Author |
Message |
SunWuKung Smarty Rookie
Joined: 20 Sep 2008 Posts: 20
|
Posted: Thu May 24, 2012 7:13 am Post subject: clearing global_tpl_vars |
|
|
Hi,
I would like to make sure that getTemplateVars () only returns the templatevars from the last fetch(). Now if a request results in two fetches getTemplateVars also returns the global_tpl_vars created in the previous template.
To prevent that I would probably need to clear global_tpl_vars or initialize smarty between two fetches or something similar, but I don't know how.
Thanks for the help.
SWK |
|
| Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 4173 Location: Hamburg / Germany
|
Posted: Thu May 24, 2012 2:33 pm Post subject: |
|
|
| Smarty::$global_tpl_vars = array(); will do the job. |
|
| 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
|