Infobox/Mod – Template talk

From Bohemia Interactive Community
Jump to navigation Jump to search

Please can someone help me with structured infobox, when are shown only parameters which are filled out? For example - if someone skip field coder, the whole line will not be displayed. I've tried to use #if , but without result:

{{#if:{{{coder|}}}|<tr><th style="background-color: #ccccff;">Coder(s)</th><td>{{{coder|}}}</td></tr>}}

It's better to have only one template then create another ones with different parameters. If you find the way, feel free to edit this one.

Yep, I'd also like to see an all in one template, but I have no idea how to do it. That's why I made a new one, we can delete it as soon as we have this working. --raedor 11:26, 21 July 2006 (CEST)

I'm going to remove the categorisation in the Mods category. Unless its required for the template it doesn't look that nice in this category. Actually I decided against it. Perhaps some wiki sauvy person can fix it.hoz 20:37, 24 July 2006 (CEST)

Didn't find how to do it with if, but an empty entry is better than nothing: Example (Island Designer)
Maybe this helps us further? From metawiki: --raedor 12:07, 25 July 2006 (CEST)

Including the content of a template in a template or variable name or parameter value

It is now possible to use a template with a name dependent on the content of another template. For example: {{{{tctc}} }}, using Template:Tctc (talk, backlinks, edit) containing "tc" and Template:Tc (talk, backlinks, edit) containing "in

Example of a constant template (one without parameters or template calls).

[[Category:Demo template]] ", gives "in". If there are no parameters, a space is needed between e.g. the two pairs of closing braces.

It is now possible (since about 19 October 2005) to use a variable with a name dependent on the content of a template.

   For example: {{CURRENT{{t day}}}} using Template:T day (talk, backlinks, edit)
   containing "DAY" gives the text 25, which is indeed the value of 26

It is now possible (since about 19 October 2005) to include the content of another template in a parameter value