Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Dedicated server web hosting provided by Guru-host.eu.
clearing global_tpl_vars

 
Post new topic   Reply to topic    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
SunWuKung
Smarty Rookie


Joined: 20 Sep 2008
Posts: 20

PostPosted: Thu May 24, 2012 7:13 am    Post subject: clearing global_tpl_vars Reply with quote

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
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 4173
Location: Hamburg / Germany

PostPosted: Thu May 24, 2012 2:33 pm    Post subject: Reply with quote

Smarty::$global_tpl_vars = array(); will do the job.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP