Difference between revisions of "Template:If"

From Robowiki
Jump to navigation Jump to search
(New page: {{{else{{{test|}}}|{{{test{{{test|}}}|{{{then|}}}}}}}}}<noinclude>Needed for things that would otherwise be insanely complex.. If it turns out to not be required, i'll ask for a delete. B...)
 
m (typos)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{{else{{{test|}}}|{{{test{{{test|}}}|{{{then|}}}}}}}}}<noinclude>Needed for things that would otherwise be insanely complex..
+
{{{else{{{test|}}}|{{{test{{{test|}}}|{{{then|}}}}}}}}}<noinclude>#if replacement.
  
If it turns out to not be required, i'll ask for a delete. But this is unlikely!
+
Usage:<pre>{{if
 +
  |test=VARIABLE_OR_PARAMETER_TO_TEST
 +
  |then=code if 'test' is not empty
 +
  |else=code if 'test' is empty
 +
}}</pre>
 +
 
 +
Parameter else is optional.
 +
 
 +
[[Category:Wikipedia Templates]]</noinclude>

Latest revision as of 14:21, 20 September 2008

  1. if replacement.

Usage:

{{if
  |test=VARIABLE_OR_PARAMETER_TO_TEST
  |then=code if 'test' is not empty
  |else=code if 'test' is empty
}}

Parameter else is optional.