Template:If: Difference between revisions

From Alpine Linux
(Create template)
 
m (formatting)
Line 3: Line 3:


== Template Documentation ==
== Template Documentation ==
<nowiki>{{</nowiki>if|<var>value</var>|<var>then</var>|<var>else</var>}} yields <var>then</var> if <var>value</var> isn't blank; otherwise it yields <var>else</var>.
One limitation: <nowiki>{{</nowiki>if|2=<var>then</var>}} yields <var>then</var> (but works properly if <var>value</var> is defined and empty).
See [http://meta.wikimedia.org/wiki/Template:Ifwp Wikimedia's Ifwp]
See [http://meta.wikimedia.org/wiki/Template:Ifwp Wikimedia's Ifwp]


</noinclude><includeonly>{{{3{{{1|}}}|{{{1{{{1|}}}|{{{2|}}}}}}}}}</includeonly>
</noinclude><includeonly>{{{3{{{1|}}}|{{{1{{{1|}}}|{{{2|}}}}}}}}}</includeonly>

Revision as of 18:42, 7 March 2012

Template Documentation for If

This page is a template and should only be used as part of other articles. For more information, read Help:Template.

Please do not experiment with this template; you could ruin all pages using this template. If you want to edit this template, copy the text to Template:Sandbox, edit and test it there, and copy it back when it works.

Feel free to voice your opinion regarding this template.

Template branching without Extension:ParserFunctions

Template Documentation

{{if|value|then|else}} yields then if value isn't blank; otherwise it yields else.

One limitation: {{if|2=then}} yields then (but works properly if value is defined and empty).

See Wikimedia's Ifwp