(Opens New Window)
Mark as an Answer
Set session value from velocity template
July 7, 2010 3:48 PM
Rank: New Member
Join Date: July 15, 2009
I have created a structure and a velocity template. As far as good. The idea is to render different outputs depending on a simple flag which will set after first view:
#set ($flag = $sessionService.setAttribute('flag',true))
<p>viewed first time in this session</p>
<p>viewed before in this session</p>
I know that I have just access to restricted variables inside velocity templates. Therefore I assume that a service could be helpful, but I am not sure.
Does anybody know if this would be possible or does anybody know another similar approach?
Thanks in advance
Sign in to vote.
Please sign in to flag this as inappropriate.