Tag: Undo |
(Add automatic next and prev using cargo) |
||
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
⚫ | |||
− | <includeonly>{{#vardefine:sort_key|{{#time:Y-m-d|{{#replace:{{BASEPAGENAME}}|Patch}}}}}}<!-- |
||
− | -->{{#vardefine:vbox_prev|{{{previous|<!-- |
||
− | -->{{#iferror:<!-- |
||
− | -->{{#expr:0+{{#dpl:<!-- |
||
− | -->|category=Patches<!-- |
||
− | -->|titlelt={{BASEPAGENAME}}<!-- |
||
− | -->|count=1<!-- |
||
− | -->|ordermethod=category,sortkey<!-- |
||
− | -->|order=descending<!-- |
||
− | -->|format=,,,<!-- |
||
− | -->|resultsheader=%PAGES%<!-- |
||
− | -->}}}}<!-- if the dpl query has no results |
||
− | -->|—<!-- then print dash |
||
− | -->|{{#dpl:<!-- else print link to version |
||
− | -->|category=Patches<!-- |
||
− | -->|titlelt={{BASEPAGENAME}}<!-- |
||
− | -->|count=1<!-- |
||
− | -->|ordermethod=category,sortkey<!-- |
||
− | -->|order=descending<!-- |
||
− | -->|format=,[[%PAGE%]],,<!-- |
||
− | -->}}<!-- |
||
− | -->}}<!-- end of iferror |
||
− | -->}}}}}<!-- |
||
− | |||
− | -->{{#vardefine:vbox_next|{{{next|<!-- |
||
− | -->{{#iferror:<!-- |
||
− | -->{{#expr:0+{{#dpl:<!-- |
||
− | -->|category=Patches<!-- |
||
− | -->|titlegt={{BASEPAGENAME}}<!-- |
||
− | -->|count=1<!-- |
||
− | -->|ordermethod=category,sortkey<!-- |
||
− | -->|format=,,,<!-- |
||
− | -->|resultsheader=%PAGES%<!-- |
||
− | -->}}}}<!-- if the dpl query has no results |
||
− | -->|—<!-- then print dash |
||
− | -->|{{#dpl:<!-- else print link to version |
||
− | -->|category=Patches<!-- |
||
− | -->|titlegt={{BASEPAGENAME}}<!-- |
||
− | -->|count=1<!-- |
||
− | -->|ordermethod=category,sortkey<!-- |
||
− | -->|format=,[[%PAGE%]],,<!-- |
||
− | -->}}<!-- |
||
− | -->}}<!-- end of iferror |
||
− | -->}}}}} |
||
− | |||
⚫ | |||
|- |
|- |
||
! colspan="2" class="infoboxname" | {{{name|{{PAGENAME}}}}} |
! colspan="2" class="infoboxname" | {{{name|{{PAGENAME}}}}} |
||
Line 52: | Line 7: | ||
{{#if: {{{platform|}}} | {{!}} <div>Platform(s)</div> {{!!}} {{{platform}}} }} |
{{#if: {{{platform|}}} | {{!}} <div>Platform(s)</div> {{!!}} {{{platform}}} }} |
||
|- |
|- |
||
− | + | {{!}} <div>Previous patch</div> {{!!}} {{#cargo_query: |
|
+ | tables = Patches |
||
+ | | fields = _pageName |
||
+ | | where = date < "{{{date|{{Patch date|{{PAGENAME}} }} }}}" |
||
⚫ | |||
+ | | order by = date DESC |
||
+ | | more results text = |
||
+ | | default = N/A |
||
+ | }} |
||
|- |
|- |
||
− | + | | {{!}} <div>Next patch</div> {{!!}} {{#cargo_query: |
|
+ | tables = Patches |
||
+ | | fields = _pageName |
||
+ | | where = date > "{{{date|{{Patch date|{{PAGENAME}} }} }}}" |
||
+ | | limit = 1 |
||
+ | | order by = date ASC |
||
+ | | more results text = |
||
+ | | default = N/A |
||
+ | }} |
||
|- |
|- |
||
{{#if: {{{version|}}} | {{!}} <div>Version number</div> {{!!}} {{{version}}} }} |
{{#if: {{{version|}}} | {{!}} <div>Version number</div> {{!!}} {{{version}}} }} |
||
Line 61: | Line 32: | ||
{{#if: {{{source|}}} | {{!}} colspan="2" {{!}} ''{{{source}}}'' }} |
{{#if: {{{source|}}} | {{!}} colspan="2" {{!}} ''{{{source}}}'' }} |
||
|- |
|- |
||
+ | |-style="text-align:center;" |
||
+ | |[[Patch Notes|All Patch Notes]] |
||
|} |
|} |
||
+ | {{#cargo_store:_table=Patches |
||
⚫ | |||
+ | | date = {{{date|{{Patch date|{{PAGENAME}} }} }}} |
||
− | == Usage == |
||
⚫ | |||
− | |||
⚫ | |||
− | <pre style="width: 750px;"> |
||
⚫ | |||
− | {{Infobox patch |
||
+ | }} |
||
− | | name = |
||
⚫ | |||
⚫ | |||
+ | <noinclude> |
||
− | | previous = |
||
+ | {{doc}} |
||
⚫ | |||
+ | {{#cargo_declare:_table=Patches |
||
⚫ | |||
+ | | date=String |
||
⚫ | |||
+ | | platform=String |
||
+ | | version=String |
||
+ | | source=String |
||
}} |
}} |
||
⚫ | |||
− | </pre> |
||
− | |||
⚫ | |||
</noinclude> |
</noinclude> |
Revision as of 20:05, 24 April 2020
Documentation
[purge]
Infobox for patch notes.
Parameters
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Date of patch | date | Date of patch shown on the patch notes, formatted as ISO 8601.
| String | suggested |
Platforms updated | platform | List of platforms affected. Use [[Template:Platform]] to list platforms.
| String | required |
version | version | no description
| String | suggested |
Patch note source | source | A link to the source of the patch notes. | String | optional |
Name of the patch | name | no description
| String | deprecated |
Previous patch | previous | Optional. Manual override to previous patch link.
| Unknown | optional |
Next patch | next | Optional. Manual override to next patch link.
| String | optional |
Empty template
{{Infobox patch | date = | platform = | source = }}
This template defines the table "Patches". View table.