Template:All-of
Documentation
This template checks whether all of a set of parameters have defined, true values↗ (values containing at least one non-whitespace character), in which case it returns the single character "1" (a true value); otherwise, it returns a null/empty value (false). Of course, this is really only useful inside of an {{#if:}} parser-function call (for help, see the previous link and Template:Test-if), and so should only be used inside of other templates, not directly in articles.
This template is necessary because it is much more difficult (i.e., requires more typing) to check for the truth of all of a set of parameters than to check for any of them (for which, just chain them together — if any are true, the final value will be true).
Currently, up to 5 positional parameters are supported, with no named parameters (although the positional parameters can be referred to by number, as seen in the third and fourth examples below).
Usage
{{all-of|param1|param2|…}}
Examples
{{all-of}}⇒{{all-of|}}⇒{{all-of|1=}}⇒{{all-of|1=A|2=B|3=C}}⇒ 1{{all-of|A|B|C}}⇒ 1{{all-of|A|B|C|}}⇒{{all-of|A||C||E}}⇒{{all-of|A| |C| |E}}⇒{{all-of|A|B|C|D|E}}⇒ 1{{all-of|A|B|C|D|E|}}⇒ 1
Note how in the last example, the empty sixth positional parameter is ignored. This template only checks for the first 5 positional parameters.
…
Implementation note
This template is currently implemented using nested {{#ifeq:}} parser function calls to determine how many parameters were actually included in the template call (whether given values or not) and to act accordingly, which might not be the most efficient way of doing this.
See also
{{both}}, for the case where there are just 2 parameters you're checking for