Sorry, I don't undersatnd what you mean. Can you explain what you mean by 
'stash lives the time of request'?

From: [email protected]
Date: Fri, 30 Oct 2015 10:19:44 -0400
To: [email protected]
Subject: Re: [PacketFence-users] Adding a session variable

The stash “lives” the time of the request.

Cheers!dw.
—Derek [email protected] :: +1.514.447.4918 (x110) :: 
+1.866.353.6153 (x110)Inverse inc. :: Leaders behind SOGo (www.sogo.nu) and 
PacketFence (www.packetfence.org)



On Oct 29, 2015, at 6:04 AM, Andy A <[email protected]> wrote:Hi.
Thanks for the explanation. I want to set (in login.html) and get (in 
release.html)  the value in the view.So should I use stash in that case?

From: [email protected]
Date: Fri, 23 Oct 2015 10:52:14 -0400
To: [email protected]
Subject: Re: [PacketFence-users] Adding a session variable

Hello Andy,
Something like 
$c->session->{"paidup"} = “DEFAULT_VALUE";
Should work just fine.
You should then be able to access it using:
my $custom_value = $c->session->{"paidup"};The stash is mainly used to pass 
values to the “view"Cheers!dw.
—Derek [email protected] :: +1.514.447.4918 (x110) :: 
+1.866.353.6153 (x110)Inverse inc. :: Leaders behind SOGo (www.sogo.nu) and 
PacketFence (www.packetfence.org)
On Oct 22, 2015, at 8:16 AM, Andy A <[email protected]> wrote:Hi.
I would like to set a session variable called 'paidup' on login.html in the 
captive portal and access it's value on release.html page.
I have seen there's a lib/pf/web/custom.pm where I can add the session variable.
pf::web::stash_template_vars = sub {    my ($portalSession, $template) = @_;    
return { 'paidup' => DEFAULT_VALUE };};
Then, in login.html I can set it to a value based on user input and in 
release.html I can access it?Is that the best way to do it or is there any 
other better way?
Thanks

------------------------------------------------------------------------------_______________________________________________PacketFence-users
 mailing 
[email protected]https://lists.sourceforge.net/lists/listinfo/packetfence-users

------------------------------------------------------------------------------
_______________________________________________ PacketFence-users mailing list 
[email protected]https://lists.sourceforge.net/lists/listinfo/packetfence-users------------------------------------------------------------------------------_______________________________________________PacketFence-users
 mailing 
[email protected]https://lists.sourceforge.net/lists/listinfo/packetfence-users

------------------------------------------------------------------------------
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users                  
                  
------------------------------------------------------------------------------
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users

Reply via email to