I want to make a template that puts a specific icon corresponding to the first variable of the template. It's easier to show than to explain:
So this:
{{fancylink|Heart}}
Would produce this:
<div class="fancylink">[[File:HEART-IMAGE.png]] [[Heart]]</div>
At first I thought I could use ifeq to do this, like this:
<div class="fancylink"> {{#ifeq: "{{{1|}}}" | "Heart" | [[File:HEART-IMAGE.png]] | }} {{#ifeq: "{{{1|}}}" | "Gem" | [[File:SOME-GEMS.gif]] | }} {{#ifeq: "{{{1|}}}" | "Etcetera" | [[File:ETC.jpg|20px]] | }} [[{{{1}}}]]</div>
And this works fine, except that having a line break between each ifeq (as above) causes formatting problems, so I have to put them all on one line, which leads to a massive block of text that is difficult to sift through visually to add more later.
Basically, if there's a workaround to the line break issue stated above, then that would solve my problem.
But if there isn't, I thought that I could make a template that would store the pairs and lookup the corresponding pair when the first of the pair is submitted. Let me show you what I mean in case I'm not clear:
<div class="fancylink">{{lookup|{{{1}}}}}[[{{{1}}}]]</div>
And then maybe in the lookup template the data is stored coherently, like a comma separated value list or something?
Does this make any sense at all? Is it possible? Help would be appreciated.