Template:Current: Difference between revisions
[checked revision] | [checked revision] |
No edit summary |
No edit summary |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{#switch:{{{1}}} | {{#switch:{{{1}}} | ||
|3=3.1 | |||
|3.1=3.1 | |3.1=3.1 | ||
|#default=2.4}} | |3.x=3.1 | ||
|2=2.4 | |||
|#default=2.4}}<noinclude> | |||
==Application== | ==Application== | ||
This template serves as a variable bearing the current version number. The version number is a string, not a figure. Therefore it can be displayes as text and analysed for equality, but it cannot be compared for size. | This template serves as a variable bearing the current version number. The version number is a string, not a figure. Therefore it can be displayes as text and analysed for equality, but it cannot be compared for size. | ||
Line 7: | Line 10: | ||
The value should be adapted, whenever a new version of {{rml}} is published. Please, check in this case, if [[Template:Version]] still functions propperly! | The value should be adapted, whenever a new version of {{rml}} is published. Please, check in this case, if [[Template:Version]] still functions propperly! | ||
As currently (as of April 2019) both | As currently (as of April 2019) both a {{rml}}2 and a {{rml}}3 version is current, there is an option to replace the v2-default ({{current}})2.4 with the v3-default ({{current|3}} with giving the single, optional, unnamed argument the value of ''3''. | ||
==Parameters== | |||
One unnamed optional argument: | |||
'''1''': value ''3'' delivers the current {{rml}}3.x-version. Else the current {{rml}}2x-Version is delivered. | |||
===Dependencies=== | ===Dependencies=== | ||
This template does not depend on any other templates. It supports [[Template:Version]]. | This template does not depend on any other templates. It supports [[Template:Version]]. | ||
==Example== | ==Example== | ||
This template is mainly intended to support [[Template:Version]]. | This template is mainly intended to support [[Template:Version]]. | ||
Line 21: | Line 26: | ||
The current {{rml}} version is {{current}} | The current {{rml}} version is {{current}} | ||
<pre>The current {{rml}} version is {{current|3.1}}</pre> | <pre>The current {{rml}} version is {{current|3}}</pre> | ||
delivers | |||
The current {{rml}} version is {{current|3}} | |||
<pre>The current {{rml}} version is {{current|2.1}}</pre> | |||
delivers | delivers | ||
The current {{rml}} version is {{current| | The current {{rml}} version is {{current|2.1}} | ||
[[Category: | |||
[[Category:ContentTemplate]] | |||
{{interwiki}} | |||
</noinclude> |
Revision as of 09:49, 19 May 2020
2.4
Application
This template serves as a variable bearing the current version number. The version number is a string, not a figure. Therefore it can be displayes as text and analysed for equality, but it cannot be compared for size.
The value should be adapted, whenever a new version of railML® is published. Please, check in this case, if Template:Version still functions propperly!
As currently (as of April 2019) both a railML®2 and a railML®3 version is current, there is an option to replace the v2-default (2.4)2.4 with the v3-default (3.1 with giving the single, optional, unnamed argument the value of 3.
Parameters
One unnamed optional argument: 1: value 3 delivers the current railML®3.x-version. Else the current railML®2x-Version is delivered.
Dependencies
This template does not depend on any other templates. It supports Template:Version.
Example
This template is mainly intended to support Template:Version.
Alternatively it can be employed to display the current version number:
The current {{rml}} version is {{current}}
delivers
The current railML® version is 2.4
The current {{rml}} version is {{current|3}}
delivers
The current railML® version is 3.1
The current {{rml}} version is {{current|2.1}}
delivers
The current railML® version is 2.4