Template:IfTHEN: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
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. |
Revision as of 21:14, 27 May 2008
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=