Template:Version: Difference between revisions

From Against the Storm Official Wiki
m (added category)
(moving documentation to subpage)
Line 1: Line 1:
<includeonly>{{#invoke:VersionMessageBox|checkVersion|updated={{{1|{{{updated|}}} }}}|currentVersion={{CurrentVersion}} }}</includeonly><noinclude>
<includeonly>{{#invoke:VersionMessageBox|checkVersion|updated={{{1|{{{updated|}}} }}}|currentVersion={{CurrentVersion}} }}</includeonly><noinclude>


<code><nowiki>{{#invoke:VersionMessageBox|checkVersion|updated={{{1|{{{updated|}}} }}}|currentVersion={{CurrentVersion}} }}</nowiki></code>
{{Documentation}}


This template references <code>{{[[Template:CurrentVersion|CurrentVersion]]}}</code>, which is currently {{CurrentVersion}}. If that's not correct, please go update it!
</noinclude>
 
Place this template at the top of every page.
 
 
== Example when the page is outdated ==
 
<code><nowiki>{{Version|0.39.2}}</nowiki></code>
 
{{Version|0.39.2}}
 
By including the Version template at the top of the page, the version message box will appear nicely above the rest of the page text.
 
 
== Example when the page is up to date ==
 
<code><nowiki>{{Version|</nowiki>{{CurrentVersion}}<nowiki>}}</nowiki></code>
 
{{Version|{{CurrentVersion}} }}
 
Since this template call references the up-to-date game version, the information box does not appear. When you make a page up to date with the version of the game that is current, there will be no message box.
 
[[Category:Message box templates]]
[[Category:Lua-based templates]]</noinclude>

Revision as of 03:58, 15 October 2024


This is the Template Documentation from Template:Version/doc.

Overview

Place this template at the top of every page that has any user-generated content. Pages with only dynamically updated data, like infoboxes and recipe tables do not need this template at the top until authors have added content by hand.

Creates a message box that displays when the page content is out of date. This template references Template:CurrentVersion, which is currently 1.4.17. If that's not correct, please go update it!

Parameters

Version

Specify the version number of the game as of your update.

Parameter Type Description
unnamed parameter string The version of the game as of your update. If the developers have labeled the version with a letter, for example, 1.0.2R, omit the letter: 1.0.2.

Examples

Basic usage

When the template call is included at the top of the article, the version message box will appear nicely above the rest of the page text.

{{Version|0.39.2}}

Script error: The function "checkVersion" does not exist.

Other examples

When all of the content in an article is up-to-date, and you update the template call with the version as of today, the message box disappears.

{{Version|1.4.17}}

Script error: The function "checkVersion" does not exist.

Since this template call uses the current game version, the information box does not appear.