|
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 |
Psyche Smarty Regular
Joined: 16 Apr 2006 Posts: 35
|
Posted: Wed Jun 16, 2010 10:19 pm Post subject: Unsetting a session variabile in a template file |
|
|
Hello,
Is it possible to unset a session variable in a template file?
Thank you. |
|
Back to top |
|
Psyche Smarty Regular
Joined: 16 Apr 2006 Posts: 35
|
Posted: Thu Jun 17, 2010 1:03 pm Post subject: |
|
|
No ideea guys? |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Thu Jun 17, 2010 1:50 pm Post subject: |
|
|
You really shouldn't do that from a template, do that in PHP.
I don't recall if this works or not:
{$smarty.session.foo|unset} [ed: it doesn't work]
Otherwise write a plugin, something like:
{unset_session var="foo"}
Last edited by mohrt on Thu Jun 17, 2010 1:56 pm; edited 1 time in total |
|
Back to top |
|
Psyche Smarty Regular
Joined: 16 Apr 2006 Posts: 35
|
Posted: Thu Jun 17, 2010 1:53 pm Post subject: |
|
|
Nope, doesn't work. I will consider writing a plugin. |
|
Back to top |
|
ChrisFah Smarty Pro
Joined: 02 Nov 2009 Posts: 159 Location: Traun, Austria
|
Posted: Thu Jun 17, 2010 4:47 pm Post subject: |
|
|
Hi,
it works with an {insert ....}
Lg, Chris |
|
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
|