Mal:Ifsubst: Forskjell mellom sideversjoner

Fra wikisida.no
Hopp til navigering Hopp til søk
imported>Alfakim
fix - still test
imported>Alfakim
finalise
Linje 1: Linje 1:
<noinclude><code></noinclude>{{#{{<includeonly>subst:</includeonly>#if:||i}}f:{{<include{{<includeonly>subst:</includeonly>#if:||only}}>subst:</include{{<includeonly>subst:</includeonly>#if:||only}}>Empty template|.}}|<!--else-->{{{else|}}}|<!--then-->{{{then|}}}}}<noinclude></code></noinclude>
{{#{{<includeonly>subst:</includeonly>#if:||i}}f:{{<include{{<includeonly>subst:</includeonly>#if:||only}}>subst:</include{{<includeonly>subst:</includeonly>#if:||only}}>Empty template|.}}|<!--else-->{{{else|{{{2|}}}}}}|<!--then-->{{{then|{{{1|}}}}}}}}<noinclude><pre>{{subst:ifsubst|then|else}}</pre>


Add the above code to a template of yours to give it <code>ifsubst</code> functionality. If your template is substituted, your "then" text will appear, else your "else" text. Note that this template in itself must be substituted into your new one.


{{{{{operand|subst:}}}#if:{{<includeonly>subst:</includeonly>Empty template|.}}|SUBST ME|ok}}
[[Category:Wikipedia special effects templates|Ifsubst]]</noinclude>

Sideversjonen fra 21. aug. 2006 kl. 17:00

{{subst:ifsubst|then|else}}

Add the above code to a template of yours to give it ifsubst functionality. If your template is substituted, your "then" text will appear, else your "else" text. Note that this template in itself must be substituted into your new one.