XFileSharing Pro - Assigning Global Variables to Templates

Message
Author
ienliven
Posts: 4
Joined: Mar 21, 2011 5:35 pm

Assigning Global Variables to Templates

#1 Postby ienliven » Mar 21, 2011 5:37 pm

Hello,
How can i assign global variables to be available on all templates?
Thanks for your attention,
Andre

User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#2 Postby PilgrimX182 » Mar 22, 2011 10:30 am

In index.cgi after line

Code: Select all

my $ses = Session->new();
insert

Code: Select all

$ses->{lang}->{VAR1} = "XXX";
replace VAR1 and XXX with your key/value.

Same for index_dl.pm if you need in on download pages.

ienliven
Posts: 4
Joined: Mar 21, 2011 5:35 pm

#3 Postby ienliven » Mar 23, 2011 3:25 pm

nice, thanks!