Template:If

From Drive: The SciFi Comic
Revision as of 13:31, 14 September 2016 by Ret Samys (talk | contribs) (Created page with "{{call|={{{2|{{{then|}}}}}}|{{{1|{{{if|}}}}}}={{{3|{{{else|}}}}}}}}<noinclude>Do NOT touch this template unless you can understand it completely. Documentation: The first par...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Do NOT touch this template unless you can understand it completely.

Documentation: The first parameter is the "condition" (can be named "if"); if it's nonempty, the second parameter (can be named "then") is shown, otherwise the third parameter "else" is shown.

NOTE: Named parameters are preferred, because they are not susceptible to problems arising from embedded "=" signs in the data.

Importing from Wikipedia is easy if it uses only the if and ifeq parser functions. You should name each positional parameter (otherwise some templates with embedded = signs may fail mysteriously), then change #if: and #ifeq: to if| and ifeq|. For this template (if), the first parameter is called "if", the second "then" and the third "else".

For example, you need to change

{{#if:{{{1|}}}|<span class="cool">|<span class="hidden">}}

into

{{if|if={{{1|}}}|then=<span class="cool">|else=<span class="hidden">}}.