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

From blackwiki
Jump to navigation Jump to search
imported>Droll
(ok)
imported>Droll
(tweak)
Line 2: Line 2:
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
  
This [[Help:Templates/Helper templates|helper template]] performs a logical ''and'' on ''n'' parameters. It can test up to '''10''' parameters.
+
This [[Help:Templates/Helper templates|helper template]] performs a logical ''and'' on ''n'' parameters where ''n'' is between 1 and 10. It is intended to be used in other templates.
 
 
It is intended to be used in other templates.
 
  
 
=== Usage ===
 
=== Usage ===
 
 
<pre style="margin:0; width:19em">
 
<pre style="margin:0; width:19em">
 
{{if all|1|2|3|4|5|6|7|8|9|10
 
{{if all|1|2|3|4|5|6|7|8|9|10
  | count = 10
+
  | n = 10
  | then = All is well.
+
  | then = All there.
 
  | else = Something is missing.
 
  | else = Something is missing.
 
}}
 
}}
Line 18: Line 15:
 
Yields:  
 
Yields:  
 
{{if all|1|2|3|4|5|6|7|8|9|10
 
{{if all|1|2|3|4|5|6|7|8|9|10
  | count = 10
+
  | n = 10
  | then = All is well.
+
  | then = All there.
 
  | else = Something is missing.
 
  | else = Something is missing.
 
}}
 
}}
Line 25: Line 22:
 
<pre style="margin:0; width:19em">
 
<pre style="margin:0; width:19em">
 
{{if all|1|2|3|4|5|6|7|8| |10
 
{{if all|1|2|3|4|5|6|7|8| |10
  | count = 10
+
  | n = 10
  | then = All is well.
+
  | then = All there.
 
  | else = Something is missing.
 
  | else = Something is missing.
 
}}
 
}}
Line 33: Line 30:
 
Yields:
 
Yields:
 
{{if all|1|2|3|4|5|6|7|8| |10
 
{{if all|1|2|3|4|5|6|7|8| |10
  | count = 10
+
  | n = 10
  | then = All is well.
+
  | then = All there.
 
  | else = Something is missing.
 
  | else = Something is missing.
 
}}
 
}}

Revision as of 19:11, 12 October 2010

This helper template performs a logical and on n parameters where n is between 1 and 10. It is intended to be used in other templates.

Usage

{{if all|1|2|3|4|5|6|7|8|9|10
 | n = 10
 | then = All there.
 | else = Something is missing.
}}

Yields: All there.

{{if all|1|2|3|4|5|6|7|8| |10
 | n = 10
 | then = All there.
 | else = Something is missing.
}}

Yields: Something is missing.

See also