More actions
No edit summary |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 2: | Line 2: | ||
{Documentation subpage}} | {Documentation subpage}} | ||
<!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE, and INTERWIKIS IN WIKIDATA --> | <!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE, and INTERWIKIS IN WIKIDATA --> | ||
== Usage == | == Usage == | ||
Meta template that returns the first parameter if evaluated during substitution, and the second parameter if evaluated during transclusion.<br />Note that this template must be used in [[mw:Manual:Substitution#Multilevel_substitution|safesubst]] mode to work properly: | Meta template that returns the first parameter if evaluated during substitution, and the second parameter if evaluated during transclusion.<br />Note that this template must be used in [[mw:Manual:Substitution#Multilevel_substitution|safesubst]] mode to work properly: | ||
| Line 8: | Line 7: | ||
The {{para|demo}} parameter can be used for testing the template. Set {{para|demo|yes}} to always display the ''yes'' text, {{para|demo|no}} to always display the ''no'' text, or {{para|demo|<nowiki>{{{demo|}}}</nowiki>}} to pass through the value from the parent template. | The {{para|demo}} parameter can be used for testing the template. Set {{para|demo|yes}} to always display the ''yes'' text, {{para|demo|no}} to always display the ''no'' text, or {{para|demo|<nowiki>{{{demo|}}}</nowiki>}} to pass through the value from the parent template. | ||
<includeonly>{{Sandbox other| | <includeonly>{{Sandbox other| | ||
Latest revision as of 06:21, 14 April 2025
| This page uses Creative Commons Licensed content from Wikipedia (view authors). |
{Documentation subpage}}
Usage
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:<noinclude/>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.