Template:Version: Difference between revisions

From Medieval Engineers Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><br/>Version:<br/>{{#if:{{{release|}}}|TRUE|FALSE}}:{{{release}}}<br/>{{#if:{{{major|}}}|TRUE|FALSE}}:{{{major}}}<br/>{{#if:{{{minor|}}}|TRUE|FALSE}}:{{{minor}}}<br/>{{#if:{{{suppress|}}}|TRUE|FALSE}}:{{{suppress}}}<br/>
<includeonly>
{{#switch: {{{release}}} | 0 = <!--
{{#switch: {{{release}}} | 0 = <!--
--><!--good release-->{{#switch: {{{major}}}<!--
--><!--good release-->{{#switch: {{{major}}} | 7 = <!--current-->{{#if: {{{minor|}}} | <!--minor exists--> {{Version/Current|{{{release}}}|{{{major}}}|{{{minor}}}|{{{suppress}}} }}| <!--minor doesn't exist-->{{Version/Current|{{{release}}}|{{{major}}}| }} }}|<!--not current-->{{#if: {{{minor|}}} | <!--minor exists--> {{Version/Old|{{{release}}}|{{{major}}}|{{{minor}}}|{{{suppress}}} }}| <!--minor doesn't exist-->{{Version/Old|{{{release}}}|{{{major}}}| }} }} }}<!--
  -->| 6 = {| class="small-box neutral"
-->|<!--bad release-->{{#if: {{{minor|}}} | <!--minor exists--> {{Version/Old|{{{release}}}|{{{major}}}|{{{minor}}}|{{{suppress}}} }}| <!--minor doesn't exist-->{{Version/Old|{{{release}}}|{{{major}}} }} }}
|-
}}<!--
| Version: || class="green-text" | {{{release}}}{{#if: {{{major|}}}|<!--major exists-->.{{{major}}} }}{{#if: {{{minor|}}}|<!--minor exists-->.{{{minor}}} }}
 
|}<!--
-->{{#if:{{{minor|}}}|<!--TRUE-->|<!--FALSE-->[[Category:Minor Version Missing]]}}</includeonly><noinclude><!--
  -->|<!--old major-->goodrel{{Version/Old<!--
      -->|rel={{{release}}}<!--
      -->{{#if:{{{major|}}}|<!--TRUE: empty-->|<!--FALSE: not empty-->|maj={{{major|}}} }}<!--
      -->{{#if:{{{minor|}}}|<!--TRUE: empty-->|<!--FALSE: not empty-->|min={{{minor|}}} }}<!--
      -->{{#if:{{{suppress|}}}|<!--TRUE: empty-->|<!--FALSE: not empty-->|sup={{{suppress|}}} }}<!--
      -->}}<!--
  -->}}<!--
-->|<!--bad release-->badrel{{Version/Old<!--
  -->|rel={{{release}}}<!--
  -->{{#if:{{{major|}}}|<!--TRUE: empty-->|<!--FALSE: not empty-->|maj={{{major|}}} }}<!--
  -->{{#if:{{{minor|}}}|<!--TRUE: empty-->|<!--FALSE: not empty-->|min={{{minor|}}} }}<!--
  -->{{#if:{{{suppress|}}}|<!--TRUE: empty-->|<!--FALSE: not empty-->|sup={{{suppress|}}} }}<!--
  -->}}<!--
-->}}
{| class="small-box neutral" |- | Version: || class="green-text" | {{{release}}}{{#if: {{{major|}}}|<!--major exists-->.{{{major}}} }}{{#if: {{{minor|}}}|<!--minor exists-->.{{{minor}}} }} |}</includeonly><noinclude><!--


-->
-->
==Example==
==Example==
{{Version <!-- Do not change the version until the entire page is up-to-date -->
{{Version <!-- Do not change the version until the entire page is up-to-date -->
|release=0|major=6|suppress=true}}
|release=0|major=7|minor=X}}


==Usage==
==Usage==
Line 33: Line 18:
*The code above can be pasted into your page and edited.
*The code above can be pasted into your page and edited.
*The ''minor'' attribute can be left out and it will not be displayed.
*The ''minor'' attribute can be left out and it will not be displayed.
*<code>suppress=true</code> can be added to suppress old version categorization.
*<code>suppress=true</code> can be added to suppress old version categorization. The ''minor'' attribute cannot be omitted with the suppress option.
*[[:Category:Old_Version]] is added conditionally.
*[[:Category:Old_Version]] is added conditionally.
*An optional parameter called suppress can be given any value to suppress the old page category tag.
{{:Template Ordering}}
{{:Template Ordering}}


==Example Source==
==Example Source==
<pre>{{Version <!-- Do not change the version until the entire page is up-to-date -->
<pre>{{Version <!-- Do not change the version until the entire page is up-to-date -->
|release=0|major=6}}</pre>
|release=0|major=7|minor=X}}</pre>
[[Category:Templates]]</noinclude>
[[Category:Templates]]</noinclude>

Latest revision as of 20:12, 5 July 2022

Example

Version: 0.7

Usage

The Version template is meant to be used at the top of articles (or just above the first heading) to indicate the version of Medieval Engineers the page was created from. If you are updating a page, do not update the version until you have confirmed that all information on the page is also up-to-date.

{{Version <!-- Do not change the version until the entire page is up-to-date -->
|release=<number>|major=<number>|minor=<number>}}
  • The code above can be pasted into your page and edited.
  • The minor attribute can be left out and it will not be displayed.
  • suppress=true can be added to suppress old version categorization. The minor attribute cannot be omitted with the suppress option.
  • Category:Old_Version is added conditionally.
  • An optional parameter called suppress can be given any value to suppress the old page category tag.

ORDERED TEMPLATE: This template is typically used on pages with other templates. It should be added in the order specified in Template Ordering.


Example Source

{{Version <!-- Do not change the version until the entire page is up-to-date -->
|release=0|major=7|minor=X}}