rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: SpiderPig902 on March 05, 2010, 02:14:28 PM

Title: VAR Question
Post by: SpiderPig902 on March 05, 2010, 02:14:28 PM
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
Title: Re: VAr Quesrion
Post by: rejetto on March 05, 2010, 03:28:33 PM
%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.}
Title: Re: VAr Quesrion
Post by: SpiderPig902 on March 05, 2010, 03:35:35 PM
awesome, works great!

Thanks!