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

From blackwiki
Jump to navigation Jump to search
imported>Droll
(tweak)
imported>Droll
(ok)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
{{Ombox
 
| type = content
 
| text = This template is '''Under development'''.
 
}}
 
  
 
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. It can test up to '''10''' parameters.
Line 13: Line 9:
  
 
<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
 
  | count = 10
 
  | then = All is well.
 
  | then = All is well.
Line 21: Line 17:
  
 
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
 
  | count = 10
 
  | then = All is well.
 
  | then = All is well.
Line 28: Line 24:
  
 
<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
 
  | count = 10
 
  | then = All is well.
 
  | then = All is well.
Line 36: Line 32:
  
 
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
 
  | count = 10
 
  | then = All is well.
 
  | then = All is well.

Revision as of 18:53, 12 October 2010

This helper template performs a logical and on n parameters. It can test up to 10 parameters.

It is intended to be used in other templates.

Usage

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

Yields:


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

Yields:


See also