Vorlage:Ifsubst: Unterschied zwischen den Versionen

Aus skandinavien-wiki.net
Keine Bearbeitungszusammenfassung
 
Keine Bearbeitungszusammenfassung
Zeile 1: Zeile 1:
<noinclude><code></noinclude>{{{{{1|}}}#if:{{<includeonly>subst</includeonly>:empty template|foo}}|{{{else|}}}|{{{then|}}}}}<noinclude></code></noinclude>
{{{{{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>.
 
{| class="wikitable"
|-
! Code !! Return !! Unparsed return
|-
| <pre>{{ifsubst|then=foo|else=bar}}</pre> || {{ifsubst|then=foo|else=bar}} || <code><nowiki>{{ifsubst|then=foo|else=bar}}</nowiki></code>
|-
| <pre>{{subst:ifsubst|then=foo|else=bar}}</pre> || {{{{{1|}}}#if:|bar|foo}} || <code><nowiki>{{{{{1|}}}#if:|bar|foo}}</nowiki></code>
|-
| <pre>{{subst:ifsubst|then=foo|else=bar|subst:}}</pre> || foo || <code><nowiki>foo</nowiki></code>
|}
</noinclude>

Version vom 21. August 2006, 18:34 Uhr

When subst:ed, this template returns parameter then, else parameter else.

Code Return Unparsed return
{{ifsubst|then=foo|else=bar}}
bar {{ifsubst|then=foo|else=bar}}
{{subst:ifsubst|then=foo|else=bar}}
foo {{{{{1|}}}#if:|bar|foo}}
{{subst:ifsubst|then=foo|else=bar|subst:}}
foo foo