Template:IfTHEN: Difference between revisions

From Elanthipedia
Jump to navigation Jump to search
m (Protected "Template:IfTHEN" [edit=sysop:move=sysop])
mNo edit summary
 
(3 intermediate revisions 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>
<noinclude>
<noinclude>
{{essential}}
==Use==
==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.

==Syntax==
If <nowiki>|true= or |false=</nowiki> is set, custom strings will be returned.
<pre>
<pre>
{{IfTHEN|variable1|....|variable10}}
{{IfTHEN|variable1|....|variable10}}
Additional Options:
|true=
|false=
</pre>
</pre>
[[Category:Templates|{{PAGENAME}}]]
[[Category:Templates|{{PAGENAME}}]]
[[Category:Templates for Templates|{{PAGENAME}}]]
[[Category:Templates for Templates|{{PAGENAME}}]]

==Also See:==
* [[Template:IfAND]]
* [[Template:IfMatch]]
* [[Template:IfXOR]]
</noinclude>
</noinclude>
<includeonly>
{{#switch: {{#if:{{{1}}}|{{{1|undefined}}}|empty}}
| empty
| undefined = 1
| <!--defined--> {{#switch: {{#if:{{{2}}}|{{{2|undefined}}}|empty}}
| empty =
| undefined = 1
| <!--defined--> {{#switch: {{#if:{{{3}}}|{{{3|undefined}}}|empty}}
| empty =
| undefined = 1
| <!--defined--> {{#switch: {{#if:{{{4}}}|{{{4|undefined}}}|empty}}
| empty =
| undefined = 1
| <!--defined--> {{#switch: {{#if:{{{5}}}|{{{5|undefined}}}|empty}}
| empty =
| undefined = 1
| <!--defined--> {{#switch: {{#if:{{{6}}}|{{{6|undefined}}}|empty}}
| empty =
| undefined = 1
| <!--defined--> {{#switch: {{#if:{{{7}}}|{{{7|undefined}}}|empty}}
| empty =
| undefined = 1
| <!--defined--> {{#switch: {{#if:{{{8}}}|{{{8|undefined}}}|empty}}
| empty =
| undefined = 1
| <!--defined--> {{#switch: {{#if:{{{9}}}|{{{9|undefined}}}|empty}}
| empty =
| undefined = 1
| <!--defined--> {{#switch: {{#if:{{{10}}}|{{{10|undefined}}}|empty}}
| empty =
| undefined = 1
| 1
}}
}}
}}
}}
}}
}}
}}
}}
}}
}}
</includeonly>

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=

Also See: