Template:Ifeq
Appearance
File:Test Template Info-Icon - Version (2).svg Template documentationviewedithistorypurge
{{#ifeq:ifeq |doc
|
{{#ifeq:show |show
|| icon | This is a documentation subpage for Template:Terminate sentence It may contain usage information, categories and other content that is not part of the original {{#if: |{{{text2}}} |{{#if: |{{{text1}}} |{{#ifeq:Template |User |template template page |{{#if:Template |template page|article}}}}}}}}. |
}}{{#if:|
|{{#ifexist:Template:Ifeq
| [[Category:{{#switch:Template |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
|
}}
}}
|
}}
| Warning | This template is used on approximately 83,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
This template is like #ifeq, but does not trim the "then" and "else" part.
Usage
- <syntaxhighlight lang="wikitext" inline>{{safesubst:{{safesubst:#ifeq:"abc"|"abc"|p1|p2}}| 1 | 0 }}</syntaxhighlight> gives "{{safesubst:{{safesubst:#ifeq:"abc"|"abc"|p1|p2}}| 1 | 0 }}"
- <syntaxhighlight lang="wikitext" inline>{{safesubst:{{safesubst:#ifeq:"abc"|"def"|p1|p2}}| 1 | 0 }}</syntaxhighlight> gives "{{safesubst:{{safesubst:#ifeq:"abc"|"def"|p1|p2}}| 1 | 0 }}"
- <syntaxhighlight lang="wikitext" inline>{{safesubst:{{safesubst:#ifeq:Ifeq|Ifeq|p1|p2}}| 1 | 0 }}</syntaxhighlight> gives "{{safesubst:{{safesubst:#ifeq:Ifeq|Ifeq|p1|p2}}| 1 | 0 }}"
See also
- {{If}}
- m:Template:Ifeq
{{safesubst:#if:{{safesubst:#ifeq:Ifeq|sandbox|1}}{{safesubst:#ifeq:Ifeq|doc|1}}|| }}