Template:IfTHEN: Difference between revisions

From Elanthipedia
Jump to navigation Jump to search
(Added custom return handling)
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>
==Usage Documentation==
==Use==
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.
If <nowiki>|true= or |false=</nowiki> is set, custom strings will be returned.
<pre>
<pre>

Revision as of 14:43, 22 April 2008


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: