Difference between revisions of "Template:If all/doc"
Jump to navigation
Jump to search
imported>Hyacinth (→See also: * {{tl|If both}}) |
imported>Vanisaac m (→See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other) |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 5: | Line 5: | ||
=== Usage === | === Usage === | ||
| + | {{col-begin}} | ||
| + | {{col-4}} | ||
<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 | ||
| n = 10 | | n = 10 | ||
| − | | then = All there | + | | then = All there! |
| − | | else = Something is missing | + | | else = Something is missing!? |
}} | }} | ||
</pre> | </pre> | ||
| Line 15: | Line 17: | ||
{{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 | ||
| − | | then = All there | + | | then = All there! |
| − | | else = Something is missing | + | | else = Something is missing!? |
}} | }} | ||
| + | <pre style="margin:0; width:19em"> | ||
| + | {{if all|1|2|3 | ||
| + | | n = 3 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | </pre> | ||
| + | → | ||
| + | {{if all|1|2|3 | ||
| + | | n = 3 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | |||
| + | |||
| + | |||
| + | ;Other examples | ||
| + | <pre style="margin:0; width:19em"> | ||
| + | {{if all|1|2|3 | ||
| + | | n = 2 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | </pre> | ||
| + | → | ||
| + | {{if all|1|2|3 | ||
| + | | n = 2 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | |||
| + | |||
| + | <pre style="margin:0; width:19em"> | ||
| + | {{if all| |2|3 | ||
| + | | n = 2 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | </pre> | ||
| + | → | ||
| + | {{if all| |2|3 | ||
| + | | n = 2 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | |||
| + | |||
| + | <pre style="margin:0; width:19em"> | ||
| + | {{if all|1|2| | ||
| + | | n = 2 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | </pre> | ||
| + | → | ||
| + | {{if all|1|2| | ||
| + | | n = 2 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | |||
| + | |||
| + | <pre style="margin:0; width:19em"> | ||
| + | {{if all| | ||
| + | | n = 1 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | </pre> | ||
| + | → | ||
| + | {{if all| | ||
| + | | n = 1 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | |||
| + | |||
| + | <pre style="margin:0; width:19em"> | ||
| + | {{if all | ||
| + | | n = 1 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | </pre> | ||
| + | → | ||
| + | {{if all | ||
| + | | n = 1 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | |||
| + | |||
| + | {{col-4}} | ||
<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 | ||
| n = 10 | | n = 10 | ||
| − | | then = All there | + | | then = All there! |
| − | | else = Something is missing | + | | else = Something is missing!? |
}} | }} | ||
</pre> | </pre> | ||
| Line 30: | Line 125: | ||
{{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 | ||
| − | | then = All there | + | | then = All there! |
| − | | else = Something is missing | + | | else = Something is missing!? |
| + | }} | ||
| + | |||
| + | |||
| + | <pre style="margin:0; width:19em"> | ||
| + | {{if all| |2|3 | ||
| + | | n = 3 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | </pre> | ||
| + | → | ||
| + | {{if all| |2|3 | ||
| + | | n = 3 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
}} | }} | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | <pre style="margin:0; width:19em"> | ||
| + | {{if all|1|2|3 | ||
| + | | n = 4 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | </pre> | ||
| + | → | ||
| + | {{if all|1|2|3 | ||
| + | | n = 4 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | |||
| + | |||
| + | <pre style="margin:0; width:19em"> | ||
| + | {{if all| |2|3 | ||
| + | | n = 4 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | </pre> | ||
| + | → | ||
| + | {{if all| |2|3 | ||
| + | | n = 4 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | |||
| + | |||
| + | <pre style="margin:0; width:19em"> | ||
| + | {{if all|1|2| | ||
| + | | n = 4 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | </pre> | ||
| + | → | ||
| + | {{if all|1|2| | ||
| + | | n = 4 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | |||
| + | |||
| + | <pre style="margin:0; width:19em"> | ||
| + | {{if all| | ||
| + | | n = 0 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | </pre> | ||
| + | → | ||
| + | {{if all| | ||
| + | | n = 0 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | |||
| + | |||
| + | <pre style="margin:0; width:19em"> | ||
| + | {{if all | ||
| + | | n = 0 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | </pre> | ||
| + | → | ||
| + | {{if all | ||
| + | | n = 0 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | |||
| + | |||
| + | {{col-4}} | ||
| + | <pre style="margin:0; width:19em"> | ||
| + | {{if all|1|2|3|4|5|6|7| | |10 | ||
| + | | n = 10 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | </pre> | ||
| + | → | ||
| + | {{if all|1|2|3|4|5|6|7| | |10 | ||
| + | | n = 10 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | |||
| + | |||
| + | <pre style="margin:0; width:19em"> | ||
| + | {{if all| | |3 | ||
| + | | n = 3 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | </pre> | ||
| + | → | ||
| + | {{if all| | |3 | ||
| + | | n = 3 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | |||
| + | |||
| + | {{col-4}} | ||
| + | <pre style="margin:0; width:19em"> | ||
| + | {{if all| | | | | | | | | |10 | ||
| + | | n = 10 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | </pre> | ||
| + | → | ||
| + | {{if all| | | | | | | | | |10 | ||
| + | | n = 10 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | |||
| + | |||
| + | <pre style="margin:0; width:19em"> | ||
| + | {{if all| | | | ||
| + | | n = 3 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | </pre> | ||
| + | → | ||
| + | {{if all| | | | ||
| + | | n = 3 | ||
| + | | then = All there! | ||
| + | | else = Something is missing!? | ||
| + | }} | ||
| + | {{col-end}} | ||
=== See also === | === See also === | ||
| Line 38: | Line 288: | ||
* {{tl|If both}} | * {{tl|If both}} | ||
* {{tl|If either}} | * {{tl|If either}} | ||
| − | * {{tl| | + | * {{tl|If empty}} |
* {{tl|Missing param}} | * {{tl|Missing param}} | ||
| − | <includeonly> | + | <includeonly>{{Sandbox other|| |
<!-- CATEGORIES GO HERE --> | <!-- CATEGORIES GO HERE --> | ||
[[Category:If-then-else templates]] | [[Category:If-then-else templates]] | ||
| − | + | }}</includeonly> | |
| − | |||
| − | |||
| − | </includeonly> | ||
Latest revision as of 17:17, 25 April 2020
| 40px | This is a documentation subpage for Template:If all. It contains usage information, categories and other content that is not part of the original template page. |
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}}
- {{Missing param}}