Template:IfMatch: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
(Add custom error messages) |
||
Line 1: | Line 1: | ||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
|{{#If:{{{error|}}} |
|||
|{{{error}}} |
|||
⚫ | |||
}} |
|||
⚫ | |||
<noinclude> |
<noinclude> |
||
==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".<br> |
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".<br> |
||
<b>Note:</b> The match is case insensitive. |
<b>Note:</b> The match is case insensitive. |
||
By specifying <nowiki>|error=</nowiki> a custom error message may be returned on no match. |
|||
==Syntax== |
|||
<pre> |
<pre> |
||
{{IfMatch | matchstring | variable1 | variable2 | .... | variable10}} |
{{IfMatch | matchstring | variable1 | variable2 | .... | variable10}} |
||
Additional options: |
|||
|error= |
|||
</pre> |
</pre> |
||
[[Category:Templates|{{PAGENAME}}]] |
[[Category:Templates|{{PAGENAME}}]] |
||
[[Category:Templates for Templates|{{PAGENAME}}]] |
[[Category:Templates for Templates|{{PAGENAME}}]] |
||
</noinclude> |
</noinclude> |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ |
Revision as of 13:10, 22 April 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 |error= a custom error message may be returned on no match.
Syntax
{{IfMatch | matchstring | variable1 | variable2 | .... | variable10}} Additional options: |error=