Template:IfTHEN: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#switch: {{#if:{{{1}}}|{{{1|undefined}}}|empty}}|empty|undefined={{#If:{{{true|}}}|{{{true}}}|1}}|<!--defined-->{{#switch: {{#if:{{{2}}}|{{{2|undefined}}}|empty}}|empty={{#If:{{{false|}}}|{{{false}}}}}|undefined={{#If:{{{true|}}}|{{{true}}}|1}}|<!--defined-->{{#switch: {{#if:{{{3}}}|{{{3|undefined}}}|empty}}|empty={{#If:{{{false|}}}|{{{false}}}}}|undefined={{#If:{{{true|}}}|{{{true}}}|1}}|<!--defined-->{{#switch: {{#if:{{{4}}}|{{{4|undefined}}}|empty}}|empty={{#If:{{{false|}}}|{{{false}}}}}|undefined={{#If:{{{true|}}}|{{{true}}}|1}}|<!--defined-->{{#switch: {{#if:{{{5}}}|{{{5|undefined}}}|empty}}|empty={{#If:{{{false|}}}|{{{false}}}}}|undefined={{#If:{{{true|}}}|{{{true}}}|1}}|<!--defined-->{{#switch: {{#if:{{{6}}}|{{{6|undefined}}}|empty}}|empty={{#If:{{{false|}}}|{{{false}}}}}|undefined={{#If:{{{true|}}}|{{{true}}}|1}}|<!--defined-->{{#switch: {{#if:{{{7}}}|{{{7|undefined}}}|empty}}|empty={{#If:{{{false|}}}|{{{false}}}}}|undefined={{#If:{{{true|}}}|{{{true}}}|1}}|<!--defined-->{{#switch: {{#if:{{{8}}}|{{{8|undefined}}}|empty}}|empty={{#If:{{{false|}}}|{{{false}}}}}|undefined={{#If:{{{true|}}}|{{{true}}}|1}}|<!--defined-->{{#switch: {{#if:{{{9}}}|{{{9|undefined}}}|empty}}|empty={{#If:{{{false|}}}|{{{false}}}}}|undefined={{#If:{{{true|}}}|{{{true}}}|1}}|<!--defined-->{{#switch: {{#if:{{{10}}}|{{{10|undefined}}}|empty}}|empty={{#If:{{{false|}}}|{{{false}}}}}|undefined={{#If:{{{true|}}}|{{{true}}}|1}}|{{#If:{{{false|}}}|{{{false}}}}}}}}}}}}}}}}}}}}}}}}}</includeonly> |
<includeonly>{{#switch: {{#if:{{{1}}}|{{{1|undefined}}}|empty}}|empty|undefined={{#If:{{{true|}}}|{{{true}}}|1}}|<!--defined-->{{#switch: {{#if:{{{2}}}|{{{2|undefined}}}|empty}}|empty={{#If:{{{false|}}}|{{{false}}}}}|undefined={{#If:{{{true|}}}|{{{true}}}|1}}|<!--defined-->{{#switch: {{#if:{{{3}}}|{{{3|undefined}}}|empty}}|empty={{#If:{{{false|}}}|{{{false}}}}}|undefined={{#If:{{{true|}}}|{{{true}}}|1}}|<!--defined-->{{#switch: {{#if:{{{4}}}|{{{4|undefined}}}|empty}}|empty={{#If:{{{false|}}}|{{{false}}}}}|undefined={{#If:{{{true|}}}|{{{true}}}|1}}|<!--defined-->{{#switch: {{#if:{{{5}}}|{{{5|undefined}}}|empty}}|empty={{#If:{{{false|}}}|{{{false}}}}}|undefined={{#If:{{{true|}}}|{{{true}}}|1}}|<!--defined-->{{#switch: {{#if:{{{6}}}|{{{6|undefined}}}|empty}}|empty={{#If:{{{false|}}}|{{{false}}}}}|undefined={{#If:{{{true|}}}|{{{true}}}|1}}|<!--defined-->{{#switch: {{#if:{{{7}}}|{{{7|undefined}}}|empty}}|empty={{#If:{{{false|}}}|{{{false}}}}}|undefined={{#If:{{{true|}}}|{{{true}}}|1}}|<!--defined-->{{#switch: {{#if:{{{8}}}|{{{8|undefined}}}|empty}}|empty={{#If:{{{false|}}}|{{{false}}}}}|undefined={{#If:{{{true|}}}|{{{true}}}|1}}|<!--defined-->{{#switch: {{#if:{{{9}}}|{{{9|undefined}}}|empty}}|empty={{#If:{{{false|}}}|{{{false}}}}}|undefined={{#If:{{{true|}}}|{{{true}}}|1}}|<!--defined-->{{#switch: {{#if:{{{10}}}|{{{10|undefined}}}|empty}}|empty={{#If:{{{false|}}}|{{{false}}}}}|undefined={{#If:{{{true|}}}|{{{true}}}|1}}|{{#If:{{{false|}}}|{{{false}}}}}}}}}}}}}}}}}}}}}}}}}</includeonly> |
||
<noinclude> |
<noinclude> |
||
{{essential}} |
|||
==Usage Documentation== |
==Usage Documentation== |
||
This template will accept up to 10 variables. If the first variable is true, it will check to see if they are all true, returning "1" if so. It will also return 1 if the first variable is not defined or whitespace. |
This template will accept up to 10 variables. If the first variable is true, it will check to see if they are all true, returning "1" if so. It will also return 1 if the first variable is not defined or whitespace. |
||
Line 18: | Line 19: | ||
* [[Template:IfAND]] |
* [[Template:IfAND]] |
||
* [[Template:IfMatch]] |
* [[Template:IfMatch]] |
||
* [[Template:IfOR]] |
|||
* [[Template:IfXOR]] |
* [[Template:IfXOR]] |
||
</noinclude> |
</noinclude> |
Latest revision as of 19:28, 22 January 2009
Essential Template
- This template is so essential that it has been protected to prevent tampering.
- If you have suggestions to extend its function or have observed bugs, please post to the discussion page.
Usage Documentation
This template will accept up to 10 variables. If the first variable is true, it will check to see if they are all true, returning "1" if so. It will also return 1 if the first variable is not defined or whitespace.
Syntax
If |true= or |false= is set, custom strings will be returned.
{{IfTHEN|variable1|....|variable10}} Additional Options: |true= |false=