rejetto forum
February 12, 2012, 03:31:20 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This forum is free, you do NOT need to register to post. But you may.
PROBLEMS? QUESTIONS? CLICK HERE!
Fill the survey!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: VAR Question  (Read 347 times)
0 Members and 1 Guest are viewing this topic.
SpiderPig902
Regular poster
**
Offline Offline

United States United States

Posts: 24


View Profile Email
« on: March 05, 2010, 08:14:28 AM »

Hi, im trying to add a VAR to my template. I want something like this:
[Set Admin]
{.administrator|SpiderPig.}

i want to set the %administrator% VAR to "spiderPig" so i can reference the %administrator% var throughout my template and if i want to change the admin i would only have to change it in one place.

Can that be done?

thanks
« Last Edit: March 05, 2010, 10:44:40 AM by Mars » Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11759


View Profile
« Reply #1 on: March 05, 2010, 09:28:33 AM »

%these% are not what we call variables.
this is how variables work: you set by {.set|administrator|SpiderPig.}
and you access the value by {.^administrator.}

another way is by using the translation system.
you set this way

[special:strings]
administrator=spiderpig

and you access it via {.!administrator.}
Logged
SpiderPig902
Regular poster
**
Offline Offline

United States United States

Posts: 24


View Profile Email
« Reply #2 on: March 05, 2010, 09:35:35 AM »

awesome, works great!

Thanks!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!


Google visited last this page January 11, 2012, 06:01:16 PM
anything