Difference between revisions of "Template:Addon Version"
From TerraFirmaCraft Plus Wiki
(Created page with "<includeonly> {{#switch: {{{0}}} | {{Version}}={{!}} style="background: #ffffff" {{!}} {{{0}}} | {{ifeq:{{{compatible}}}|true|{{!}} style="background: #ffaa00" {{!}} {{{0}}}...") |
|||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly> | + | <includeonly>{{#switch: {{{1|?}}} |
− | {{#switch: {{{ | + | <!-- Addon version is latest version --> |
− | + | |{{Version}} = style="background: #ffffff" {{!}} {{{1|?}}} | |
− | + | <!-- Addon version not specified, default to ? --> | |
− | }} | + | |? = style="background: #ffffff" {{!}} ? |
− | </includeonly> | + | <!-- Addon version is not latest version, default to compatible --> |
+ | | | ||
+ | {{#ifeq:{{{2|}}} | ||
+ | | incompatible | ||
+ | | style="background: #ff0000" {{!}} {{{1|?}}} | ||
+ | | style="background: #ffaa00" {{!}} {{{1|?}}} | ||
+ | }} | ||
+ | }}</includeonly> | ||
<noinclude> | <noinclude> | ||
− | {{ | + | {{/doc}} |
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude> | </noinclude> |
Latest revision as of 22:25, 11 August 2021
Template documentation (for the above template, sometimes hidden or invisible)
This template makes a table row which background is set according to whether the version is equal to the current version (which is set in Template:Version).
Parameter | Meaning |
---|---|
1 | A version number (e.g. 0.85.2). Defaults to "?" |
2 | "incompatible" if this addon is incompatible with the current version. |
Example
Code | Result |
---|---|
{{Addon Version|{{Version}}}}
|
0.89.1 |
{{Addon Version|0.85.2}}
|
0.85.2 |
{{Addon Version|0.83.0|incompatible}}
|
0.83.0 |
Visit Template:Addon Version/doc to edit this text! (How does this work?)