Assigning Global Variables to Templates

Powerfull XFileSharing version

Moderator: admin

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

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: 2182
Joined: Mar 22, 2006 1:39 pm
Location: UFO Lab
Contact:

#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
Location: Brazil

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

nice, thanks!


Return to “XFileSharing Pro”

Who is online

Users browsing this forum: No registered users and 0 guests