Page 1 of 1

Variable Available Across Templates

Posted: Tue Oct 29, 2013 11:36 am
by benm
Is it possible to set a variable in one template and have it available to use in another template?

Edit:
I forgot to add that the template I want to set the variable in is using a different domain, although it is still the same site.

Re: Variable Available Across Templates

Posted: Tue Oct 29, 2013 12:57 pm
by chandra
You can do it something like this with a cookie or a session variable

Re: Variable Available Across Templates

Posted: Tue Oct 29, 2013 2:38 pm
by benm
Hi Chandra,

Many thanks for your reply. Unfortunately the other template is being used for a different domain, although it is still the same site (it is a landing page). So cookies or session variables won't work.

Ben

Re: Variable Available Across Templates

Posted: Tue Oct 29, 2013 11:10 pm
by chandra
Another way could be to save the variable in a text file inside the /tmp/config folder

Re: Variable Available Across Templates

Posted: Thu Oct 31, 2013 3:54 am
by rotezecke