Template:If all: Difference between revisions
Template page
More actions
Created page with "{{#ifexpr:{{{n|0}}}>=1|{{#if:{{{1|}}} |{{#ifexpr:{{{n|0}}}>=2|{{#if:{{{2|}}} |{{#ifexpr:{{{n|0}}}>=3|{{#if:{{{3|}}} |{{#ifexpr:{{{n|0}}}>=4|{{#if:{{{4|}}} |{{#ifexpr:{{{n|0}}}>=5|{{#if:{{{5|}}} |{{#ifexpr:{{{n|0}}}>=6|{{#if:{{{6|}}} |{{#ifexpr:{{{n|0}}}>=7|{{#if:{{{7|}}} |{{#ifexpr:{{{n|0}}}>=8|{{#if:{{{8|}}} |{{#ifexpr:{{{n|0}}}>=9|{{#if:{{{9|}}} |{{#ifexpr:{{{n|0}}}=10|{{#if:{{{10|}}}|{{{then|}}}|{{{else|}}} }}}}{{#..." |
(No difference)
|
Latest revision as of 23:01, 16 February 2025
Template:High-use 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
| n = 3
| then = All there!
| else = Something is missing!?
}}→ All there!
{{if all|1|2|3
| n = 2
| then = All there!
| else = Something is missing!?
}}→ All there!
{{if all| |2|3
| n = 2
| then = All there!
| else = Something is missing!?
}}→ Something is missing!?
{{if all|1|2|
| n = 2
| then = All there!
| else = Something is missing!?
}}→ All there!
{{if all|
| n = 1
| then = All there!
| else = Something is missing!?
}}→ Something is missing!?
{{if all
| n = 1
| then = All there!
| else = Something is missing!?
}}→ Something is missing!?
|
{{if all|1|2|3|4|5|6|7|8| |10
| n = 10
| then = All there!
| else = Something is missing!?
}}→ Something is missing!?
{{if all| |2|3
| n = 3
| then = All there!
| else = Something is missing!?
}}→ Something is missing!?
{{if all|1|2|3
| n = 4
| then = All there!
| else = Something is missing!?
}}→ Something is missing!?
{{if all| |2|3
| n = 4
| then = All there!
| else = Something is missing!?
}}→ Something is missing!?
{{if all|1|2|
| n = 4
| then = All there!
| else = Something is missing!?
}}→ Something is missing!?
{{if all|
| n = 0
| then = All there!
| else = Something is missing!?
}}→
{{if all
| n = 0
| then = All there!
| else = Something is missing!?
}}→
|
{{if all|1|2|3|4|5|6|7| | |10
| n = 10
| then = All there!
| else = Something is missing!?
}}→ Something is missing!?
{{if all| | |3
| n = 3
| then = All there!
| else = Something is missing!?
}}→ Something is missing!?
|
{{if all| | | | | | | | | |10
| n = 10
| then = All there!
| else = Something is missing!?
}}→ Something is missing!?
{{if all| | |
| n = 3
| then = All there!
| else = Something is missing!?
}}→ Something is missing!? |
See also
- {{If all}}
- {{If both}}
- {{If either}}
- {{If empty}}
- Module:Parameter validation