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

From blackwiki
Jump to navigation Jump to search
imported>Droll
(tweak)
imported>Droll
(added a bit more)
Line 5: Line 5:
 
| text = This template is '''Under development''' but seems functional.
 
| text = This template is '''Under development''' but seems functional.
 
}}
 
}}
 +
 +
This [[Help:Templates/Helper templates|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 ===
 
=== Usage ===
  
<pre>
+
<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
Line 23: Line 27:
 
}}
 
}}
  
<pre>
+
<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

Revision as of 23:30, 27 July 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