Variable Available Across Templates

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
benm
New Member
New Member
Posts: 2
Joined: Tue Oct 29, 2013 11:33 am

Variable Available Across Templates

Post 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.
Last edited by benm on Tue Oct 29, 2013 2:40 pm, edited 1 time in total.
chandra

Re: Variable Available Across Templates

Post by chandra »

You can do it something like this with a cookie or a session variable
benm
New Member
New Member
Posts: 2
Joined: Tue Oct 29, 2013 11:33 am

Re: Variable Available Across Templates

Post 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
chandra

Re: Variable Available Across Templates

Post by chandra »

Another way could be to save the variable in a text file inside the /tmp/config folder
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm

Re: Variable Available Across Templates

Post by rotezecke »

Post Reply

Return to “The Lounge”