Difference between revisions of "Template:If"

From Userful Support
Jump to navigationJump to search
m (Protected "Template:If" [edit=sysop:move=sysop])
(No difference)

Latest revision as of 19:58, 16 November 2006

Template: if -- performs if-then-else


  • 1 -- the condition to test (defined or undefined parameter, etc.)
  • then -- what to do if condition is true
  • else -- what to do if condition is false


Note that you can skip then or else if you do not want to include it. Examples:
{{if|{{{username|}}}|then=Name is {{{username}}}|else=Who is this?}}
{{if|{{{username|}}}|else=Who is this?}}