Thread:BentLauridsenDK/@comment-15636815-20151031224703/@comment-15636815-20151101013244

This is what the first part of your code does.
 * if parameter 1 exists
 * then display gems icon
 * else display gold icon

The template never checks the value of 1. It only checks to see whether 1 exists. This results in exactly the scenario you described. If you type "gold", "gems", or "Garfield loves lasagna" is the first field, you will get the then code. If you leave it blank, you will get the else code.

I altered the code to eliminate the #if statement completely. Now, the first part of the code looks like this: That looks really complex, so let's pull it apart.


 * 1) Begin with your opening parenthesis.
 * 2) Open two curly braces. This tells Wiki that we want to call a template.
 * 3) Now we have to tell Wiki which template we want. Instead of hard-coding the name into the template, we simply insert parameter 1. Of course, parameter 1 is either  or.
 * 4) Close the template call.
 * 5) Display the reward icon and closing parenthesis.
 * 6) Tell all your friends how amazed you are that that worked.

Also, I recommend you delete the line feeds with the  tags. Those line feeds will show in your output. I'm pretty sure that's why the icons don't show next to the bullets in the documentation.