Difference between revisions of "Template:Version"
From Kerbal Space Program Wiki
m (Ugh.) |
m |
||
Line 1: | Line 1: | ||
− | [[Version History#v{{{1}}}|{{#if: {{{2}}}|{{#if: {{{2|}}}|{{{2}}} |version }}|}}{{{1}}}]]<noinclude> | + | [[Version History#v{{{1}}}|{{#if: {{{2}}}|{{#if: {{{2|}}}|{{{2}}}|version}} |}}{{{1}}}]]<noinclude> |
<pre> | <pre> | ||
Line 5: | Line 5: | ||
if {{{2}}} // prefix text is defined as a non-empty string | if {{{2}}} // prefix text is defined as a non-empty string | ||
"{{{2}}} {{{1}}}" | "{{{2}}} {{{1}}}" | ||
− | else // prefix | + | else // prefix text is undefined |
"version {{{1}}}" | "version {{{1}}}" | ||
− | else // prefix | + | else // prefix text is defined as an empty string |
"{{{1}}}" | "{{{1}}}" | ||
</pre> | </pre> |
Revision as of 17:57, 28 September 2012
[[Version History#v{{{1}}}|version {{{1}}}]]
if {{{2|}}} // prefix text is undefined OR defined as a non-empty string if {{{2}}} // prefix text is defined as a non-empty string "{{{2}}} {{{1}}}" else // prefix text is undefined "version {{{1}}}" else // prefix text is defined as an empty string "{{{1}}}"
See http://www.mediawiki.org/wiki/Help:Templates#Default_values for more information.
Template
Usage | Produces |
---|---|
{{version|0.17}} |
version 0.17 |
{{version|0.17|}} |
0.17 |
{{version|0.17|prefix text here}} |
prefix text here 0.17 |