Forum:Problem with variables

ShoutWiki — express yourself and be heard!
Jump to navigation Jump to search

Forums: Index Community help


Hello guys,

It's been a while since I came here asking for some help. Today I created a new template on my wiki where I tried to use some variables in the form of {{#vardefine:…}} and {{#var:…}}. I made sure that the syntax is correct before creating the page, however, now that I called the template using {{Tag|name=…}}, for some reason, it doesn't behave correctly. I would therefore like to ask anyone with more experience here, where did I made a mistake?

Here's the code:

{{#ifeq:{{{name}}}|free|{{#vardefine:color|olivedrab}}{{#vardefine:text|FREE}}}}
{{#ifeq:{{{name}}}|demo|{{#vardefine:color|darkorange}}{{#vardefine:text|DEMO}}}}
<div style="float:right;background:{{#var:color}};color:white;font-size:75%;position:relative;left:6px;top:6px"> '''{{#var:text}}''' </div>

As always, every help is very much appreciated! Regards, --MYself (talk) 18:32, 20 August 2014 (UTC)