Template:Ifsubst: Difference between revisions
From All Skies Encyclopaedia
imported>Amalthea (fix) |
imported>Dinoguy1000 (fix "|=foo" bug) |
||
(7 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{ safesubst:<noinclude/>#if:{{{demo|}}} |
|||
⚫ | |||
|{{ safesubst:<noinclude/>#ifeq:{{{demo}}} |no |
|||
⚫ | |||
|{{{no|{{{2|}}}}}} |
|||
|{{{yes|{{{1|}}}}}} |
|||
===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 [[meta:Help:Safesubst|safesubst]] mode to work properly: |
|||
:<code><nowiki>{{ {{{|safesubst:}}}ifsubst| yes | no }}</nowiki></code> |
|||
<!--Categories--> |
|||
[[Category:Wikipedia metatemplates|{{PAGENAME}}]] |
|||
}} |
}} |
||
⚫ | |||
|{{{no|{{{2|}}}}}} |
|||
|{{{yes|{{{1|}}}}}} |
|||
}}}}<noinclude> |
|||
⚫ | |||
</noinclude> |
</noinclude> |