Template:Ifsubst: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Alfakim
No edit summary
Ookami (talk | contribs)
m 20 revisions imported
 
(18 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{{{{1|}}}#if:{{<includeonly>subst</includeonly>:empty template|foo}}|{{{else|}}}|{{{then|}}}}}<noinclude>'''When <code>subst:</code>ed, this template returns parameter <code>then</code>, else parameter <code>else</code>.
{{ {{{|safesubst:}}}#if:{{{demo|}}}
 
|{{ {{{|safesubst:}}}#ifeq:{{{demo}}} |no
{| class="wikitable"
|{{{no|{{{2|}}}}}}
|-
|{{{yes|{{{1|}}}}}}
! Code !! Return !! Unparsed return
}}
|-
|{{ {{{|safesubst:}}}#ifeq:{{ {{{|safesubst:}}}NAMESPACE}}|{{NAMESPACE}}
| <pre>{{ifsubst|then=foo|else=bar}}</pre> || {{ifsubst|then=foo|else=bar}} || <code><nowiki>{{ifsubst|then=foo|else=bar}}</nowiki></code>
|{{{no|{{{2|}}}}}}
|-
|{{{yes|{{{1|}}}}}}
| <pre>{{subst:ifsubst|then=foo|else=bar}}</pre> || {{{{{1|}}}#if:|bar|foo}} || <code><nowiki>{{{{{1|}}}#if:|bar|foo}}</nowiki></code>
}}}}<noinclude>
|-
{{Documentation}}
| <pre>{{subst:ifsubst|then=foo|else=bar|subst:}}</pre> || foo || <code><nowiki>foo</nowiki></code>
|}
</noinclude>
</noinclude>

Latest revision as of 02:52, 3 September 2020