Template:IF/doc

From blackwiki
< Template:IF
Revision as of 21:31, 14 June 2011 by imported>B1KWikis (Created documentation subpage)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Usage

Usage of this template is moderately simple.

To use, place {{subst:IF|1|t}}Why?.

This will produce:

{{#if:{{{1|}}}|{{{1}}}}}

Why

  • The first parameter must be a number (1-infinity)
  • this is what generates the new unnamed parameter.
  • The second parameter must be a lowercase t.
  • because the code includes uses of "subs{{{2}}}" as a workaround (to make this possible), so it must be t to complete the subst
  • A "subst:" must be put at the beginning
  • I don't know why for this one, all I know is that a lack of that part causes glitches, so it's not wise to go against that.

See Also

Template:if - Not to be confused with if, which serves a different purpose.