Template:Version: Difference between revisions

From railML 2 Wiki
Jump to navigation Jump to search
[checked revision][checked revision]
 
(5 intermediate revisions by the same user not shown)
Line 6: Line 6:
|2.0
|2.0
|2.1=outdated
|2.1=outdated
|2.2
|2.3=supported
|2.4
|3.1=current
|2.5
|3.2
|3.x=upcoming
|#default=unknown}}</includeonly><noinclude>
|#default=unknown}}</includeonly><noinclude>
==Application==
==Usage==
This template displays, for which version of {{rml}} a page was written. It compares that string with the current version number deposed in [[Template:Current]] and reports, whether the content can be considered to be up to date or not.
This template maps, whether a certain version number exists and whether it is current, upcoming or outdated.
 
===Arguments===
As to support the maintanance of this wiki, the template categorizes pages, in which it is included, according to the version number for which they have been written. Thus pages that are up to date can be found in  [[category:Pages written for version {{current}}]]<!--{{current}} hier nicht expandieren!-->.
The only, unnamed and default argument of this template is the version number to be checked.


This template is intenden to be included at the top of a page. Please, consider, that [[Template:Current]] has to be adapted by hand whenever a new version of {{rml}} is published.
===Arguments===
The only, unnamed and default argument of this template is the version number for which a page has been written.
===Dependencies===
This template employs [[Template:Current]]; there are no other templates using it.
==Example==
==Example==
<nowiki>{{version|{{current}}}}</nowiki>
<nowiki>{{version|{{current}}}}</nowiki>
Line 28: Line 30:
delivers
delivers


{| class="wikitable" style="text-align:center"
{{version|0.80}}
|bgcolor={{#switch:0.80|{{current}}="green"|#default="#F0CA00"}}|This page refers to version 0.80 of {{rml}}.<br>Therefore the content is {{#switch:0.80|{{current}}=up to date.|#default=possibly outdated.<br>The current version is {{current}}.}}
 
|}
<nowiki>{{version|1}}</nowiki>
 
delivers
 
{{version|1}}
 
<nowiki>{{version|2.3}}</nowiki>
 
delivers
 
{{version|2.3}}
 
<nowiki>{{version|3.x}}</nowiki>
 
delivers
 
{{version|3.x}}


The depiction has been adapted in these examples:
[[Category:ContentTemplate]]</noinclude>
*The automatic categorization has been suppressed
*The window is displayed within the paragraph. Normally it is displayed on the right and surrounded by the flowing text.
[[Category:Template]]</noinclude>

Latest revision as of 13:48, 19 August 2019

Usage

This template maps, whether a certain version number exists and whether it is current, upcoming or outdated.

Arguments

The only, unnamed and default argument of this template is the version number to be checked.

Example

{{version|{{current}}}}

delivers (as an illustrative example; Template:Current should never be employed within this template in practice; always write the version number explicitely)

upcoming

{{version|0.80}}

delivers

unknown

{{version|1}}

delivers

outdated

{{version|2.3}}

delivers

supported

{{version|3.x}}

delivers

upcoming