Template:History: Difference between revisions
imported>Ttv pedro270707 No edit summary |
imported>Ttv pedro270707 mNo edit summary |
||
(30 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#ifeq: {{#var: history}} | 1 | | {{#vardefine: history|1}}<table class="wikitable"> }}<!-- | <includeonly>{{#ifeq: {{#var: history}} | 1 | | {{#vardefine: history|1}}<table class="wikitable"><tr><th colspan="3">History</th></tr> }}<!-- | ||
-->{{ | -->{{ | ||
#vardefine: history-rows | {{#len: 1{{ | #vardefine: history-rows | {{#len: 1{{ | ||
Line 9: | Line 9: | ||
}} | }} | ||
}} | }} | ||
}}{{#ifeq: {{#var: history}} | 1 | }}< | }}<!-- | ||
--><tr><th rowspan="{{#var:history-rows}}">[[{{{1|}}}]]</th></tr><!-- | -->{{#if: {{{snap|}}} | | ||
{{#ifeq: {{#if: {{{1|}}} | "{{{1|}}}" | "{{#var:history-ver|}}"}} | "{{#var:history-ver|}}" | | | |||
{{#vardefine:history-index|{{#expr:{{#var:history-index|0}}+1}}}} | |||
{{#vardefine:history-ver|{{{1|}}}}} | |||
<tr><th class="nowrap" colspan="1" rowspan="{{#var_final:history-rowspan-{{#var:history-index}}}}">{{#ifeq: {{{1|}}} | ? | '''?''' | [[{{{1|}}}]]}}</th></tr> | |||
}}<tr><th colspan="1" rowspan="{{#var:history-rows}}">[[{{#if: {{#pos:{{{snap|}}}|Pre-}}{{#pos:{{{snap|}}}|pre-}}{{#pos:{{{snap|}}}|Prerelease}} | {{#var:history-ver}} {{{snap|}}}{{!}}{{{snap|}}} | {{{snap|}}} }}]]</th></tr> | |||
| {{#vardefine:history-index|{{#expr:{{#var:history-index|0}}+1}}}}{{#vardefine:history-ver|{{{1|}}}}}<tr><th colspan="2" rowspan="{{#var:history-rows}}">{{#ifeq: {{{1|}}} | ? | '''?''' | [[{{{1|}}}]]}}</th></tr> }}<!-- define history rowspan (outside of if statement): -->{{#vardefine:history-rowspan-{{#var:history-index}}|{{#expr:{{#var:history-rowspan-{{#var:history-index}}|1}}+{{#var:history-rows}}}}}}<!-- | |||
-->{{ | -->{{ | ||
#fornumargs: argnum | argval | {{ | #fornumargs: argnum | argval | {{ | ||
#switch: {{#var:argnum}} | #switch: {{#var:argnum}} | ||
| 1 = <!-- | | 1 = <!-- 1 is the version --> | ||
| #default = <tr><td>{{#var:argval}}</td></tr> | | #default = <tr><td>{{#var:argval}}</td></tr> | ||
}} | }} |
Latest revision as of 15:08, 28 March 2023
[view | | | ]Documentation
This template is meant to be used at the History section of a page to display in-game changes to the article's content.
Arguments[edit source]
Argument | Note |
---|---|
1 |
Defines the version of the section. |
2 + |
Defines the changes in the version. |
snap |
Defines if the changes are in a snapshot. |
foot |
Needs to be set to y in the last instance of the template.
|
Usage[edit source]
The first argument of the template should be the version in question. Any arguments after that will be considered changes in the version and be displayed to the right of it.
In the last instance of the template, set foot
to a true value in order to close the table.
Code | Result | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{history|Better than Adventure! 1.7.6.2|Added controller support.|Added a server player list.|foot=y}} |
| |||||||||||||||||
{{history|Better than Adventure! 1.7.6.2|Added controller support.|Added a server player list.}}{{history|Better than Adventure! 1.7.6.2_01|Ferns can now spawn on [[Season|spring]].|foot=y}} |
| |||||||||||||||||
{{history|Minecraft Beta 1.7.6|snap=21w34a|Added [[season]]s.|Added [[Game mode|creative mode]].|Added world types.|Added [[Tree|cherry trees]].}} {{history||snap=21w36a|Added Extended McRegion format.}} {{history|Minecraft Beta 1.7.6|Added [[Tree|swamp trees]].}} {{history|Better than Adventure! 1.7.7.0|snap=Pre-1|Added flags.|foot=y}} |
|
[view | | | ]The above documentation is transcluded from Template:History/doc.