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

From blackwiki
Jump to navigation Jump to search
imported>Droll
(tweak)
imported>Droll
(tweak)
Line 12: Line 12:
 
}}
 
}}
 
</pre>
 
</pre>
 
+
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
 
  | n = 10
 
  | n = 10
Line 19: Line 18:
 
  | else = Something is missing.
 
  | else = Something is missing.
 
}}
 
}}
 +
  
 
<pre style="margin:0; width:19em">
 
<pre style="margin:0; width:19em">
Line 27: Line 27:
 
}}
 
}}
 
</pre>
 
</pre>
 
+
Yields:
 
 
{{if all|1|2|3|4|5|6|7|8| |10
 
{{if all|1|2|3|4|5|6|7|8| |10
 
  | n = 10
 
  | n = 10

Revision as of 19:14, 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.
}}

→ All there.


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

→ Something is missing.

See also