rejetto forum

VAR Question

0 Members and 1 Guest are viewing this topic.

Offline SpiderPig902

  • Occasional poster
  • *
    • Posts: 24
    • View Profile
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, 04:44:40 PM by Mars »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
%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.}


Offline SpiderPig902

  • Occasional poster
  • *
    • Posts: 24
    • View Profile