Template:Ifsubst/doc
This is a documentation subpage for Template:Ifsubst. It contains usage information, categories and other content that is not part of the original Template page. |
Usage
[edit]Meta template that returns the first parameter if evaluated during substitution, and the second parameter if evaluated during transclusion.
Note that this template must be used in safesubst mode to work properly:
{{ {{{|safesubst:}}}ifsubst| yes | no }}
The |demo=
parameter can be used for testing the template. Set |demo=yes
to always display the yes text, |demo=no
to always display the no text, or |demo={{{demo|}}}
to pass through the value from the parent template.
TemplateData
[edit]This is the TemplateData documentation for this template used by VisualEditor and other tools.
Ifsubst
Meta-template that shows different results when substituted or transcluded.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Substituted | 1 | The result when this template is substituted. | Content | suggested |
Transcluded | 2 | The result when this template is not substituted.
| Content | suggested |
Demo? | demo | Whether to show the substituted result regardless of whether the template was actually substituted. Set to ânoâ to always show the transcluded result.
| String | optional |
Edit parameter translations