Template:IfMatch: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
<includeonly> |
<includeonly> |
||
{{#switch:{{lc:{{{1}}}}}|{{lc:{{{2}}}}}|{{lc:{{{3}}}}}|{{lc:{{{4}}}}}|{{lc:{{{5}}}}}|{{lc:{{{6}}}}}|{{lc:{{{7}}}}}|{{lc:{{{8}}}}}|{{lc:{{{9}}}}}|{{lc:{{{10}}}}}|{{lc:{{{11}}}}} = {{#If:{{{true|}}}|{{{true}}}|1}}|{{#If:{{{false|}}}|{{{false}}}}}}} |
|||
{{#switch: {{lc:{{{1}}} }} |
|||
|{{lc:{{{2}}}}} |
|||
|{{lc:{{{3}}}}} |
|||
|{{lc:{{{4}}}}} |
|||
|{{lc:{{{5}}}}} |
|||
|{{lc:{{{6}}}}} |
|||
|{{lc:{{{7}}}}} |
|||
|{{lc:{{{8}}}}} |
|||
|{{lc:{{{9}}}}} |
|||
|{{lc:{{{10}}}}} |
|||
|{{lc:{{{11}}}}} = {{#If:{{{true|}}}|{{{true}}}|1}} |
|||
|{{#If:{{{false|}}} |
|||
|{{{false}}} |
|||
}} |
|||
}} |
|||
</includeonly> |
</includeonly> |
||
<noinclude> |
<noinclude> |
Revision as of 20:02, 26 May 2008
Usage Documentation
This template will accept one variable which it will compare to up to 10 other variables. If any of them match the first, it will return "1".
Note: The match is case insensitive.
By specifying |true= and |false= a custom strings may be returned on match and no match.
Syntax
{{IfMatch | matchstring | variable1 | variable2 | .... | variable10}} Additional options: |true= |false=