[dancer-users] session variables inside the template?

Hugues hugues at max4mail.com
Wed Jan 28 09:09:41 GMT 2015


Hello
you can directly print session fieds in your TT template

[% session.username %]

just before push this info in your user session

session username     => params->{username}

bye
Hugues


Le 28/01/2015 09:49, Nikos Vaggalis a écrit :
> Hi,
>
> Can you access session variables inside the TT template?
> Like if I set
>                 session 'display' =>10;
> in my controller, then how can I access the vaule from within the 
> template?
>
> And, how do I dereference a scalar reference passed to the template as :
>
> my $myvalue=10
>
> return template  '/data' => {
>          total=>\$myvalue
>     };
>
>
>
>
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20150128/e50324f1/attachment.html>


More information about the dancer-users mailing list