Template:Addon Version

From TerraFirmaCraft Plus Wiki
Revision as of 22:52, 10 August 2021 by Mount2010 (talk | contribs) (Created page with "<includeonly> {{#switch: {{{0}}} | {{Version}}={{!}} style="background: #ffffff" {{!}} {{{0}}} | {{ifeq:{{{compatible}}}|true|{{!}} style="background: #ffaa00" {{!}} {{{0}}}...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


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}}}}

{{ifeq:{{{compatible}}}|true|| style="background: #ffaa00" | {{{0}}}|{!} style="background: #ff0000" | {{{0}}}}}


{{Addon Version|0.85.2}}

{{ifeq:{{{compatible}}}|true|| style="background: #ffaa00" | {{{0}}}|{!} style="background: #ff0000" | {{{0}}}}}


{{Addon Version|0.83.0|incompatible}}

{{ifeq:{{{compatible}}}|true|| style="background: #ffaa00" | {{{0}}}|{!} style="background: #ff0000" | {{{0}}}}}