Difference between revisions of "Template:If both/doc"

From blackwiki
Jump to navigation Jump to search
imported>Droll
(tidy)
imported>Droll
(added category)
Line 23: Line 23:
 
<tt><nowiki>{{if both | | b | x | y }}</nowiki></tt> → {{if both | | b | x | y }}
 
<tt><nowiki>{{if both | | b | x | y }}</nowiki></tt> → {{if both | | b | x | y }}
  
==See also===
+
== See also ==
  
 
* {{tl|ifempty}}
 
* {{tl|ifempty}}
Line 29: Line 29:
  
 
<noinclude>
 
<noinclude>
<!-- PLEASE ADD CATEGORIES AND
+
<!-- CATEGORIES GO HERE -->
INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
+
Category:If-then-else templates
  
 +
<!-- INTERWIKIS GO HERE -->
  
 
</noinclude>
 
</noinclude>

Revision as of 00:32, 1 August 2010


This helper template is designed to be used in other templates. It can help editors create templates that or self documenting.

Usage

If a and b then x.

If a nor b then y.

If a or b then y.

It can be used to replace the construct: {{#if: a | {{#if: b | x | y }}

Examples

{{if both | a | b | x }} → x

{{if both | a | | x | y }} → y

{{if both | | b | x | y }} → y

See also


Category:If-then-else templates