Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Join the Playtest on Steam Now: SpiritVale

Template:PatchNav: Difference between revisions

Template page
No edit summary
m Protected "Template:PatchNav" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
Tags: Mobile edit Mobile web edit
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
__NOFACTBOX__
__NOFACTBOX__
<div style="border:2px solid #372b54; border-radius:10px; padding:0.5em; width:100%; box-sizing:border-box; background:transparent;">
<div class="sv-card sv-pnav" style="float:none;width:100%;max-width:700px;margin:1em auto;padding:.65em .75em;box-sizing:border-box;"><div class="sv-pnav__grid" style="display:grid;grid-template-columns:1fr 1fr 1fr;gap:.5em;align-items:center;"><div class="sv-pnav__col sv-pnav__prev" style="text-align:left;">{{PatchNav/Prev|page={{{Prev|{{{PrevTitle|}}}}}}}}</div><div class="sv-pnav__col sv-pnav__current" style="text-align:center;">{{PatchNav/Current|publishdate={{{publishdate|}}}|blurb={{{blurb|}}}}}</div><div class="sv-pnav__col sv-pnav__next" style="text-align:right;">{{PatchNav/Next|page={{{Next|{{{NextTitle|}}}}}}}}</div></div></div>
{| style="width:100%; table-layout:fixed; border-collapse:collapse; margin:0;"
| style="width:33.33%; text-align:left; vertical-align:middle; padding:0.25em 0;" |
''Previous''<br />
{{#if:{{{Prev|{{{PrevTitle|}}}}}}|
'''[[Update:{{{Prev|{{{PrevTitle|}}}}}}|{{#titleparts:{{{Prev|{{{PrevTitle|}}}}}}|1|2|:}}]]'''<br />
{{#if: {{#show: Update:{{{Prev|{{{PrevTitle|}}}}}} | ?Publish date }}
| {{#if: {{#time:U|{{#show: Update:{{{Prev|{{{PrevTitle|}}}}}} | ?Publish date#ISO }}}}
  | {{#ifexpr: {{#time:U|{{#show: Update:{{{Prev|{{{PrevTitle|}}}}}} | ?Publish date#ISO }}}} >= {{#time:U}}
    | Upcoming: {{#show: Update:{{{Prev|{{{PrevTitle|}}}}}} | ?Publish date }}
    | Released: {{#show: Update:{{{Prev|{{{PrevTitle|}}}}}} | ?Publish date }}
    }}
  | Release date: Unknown }}
| Release date: Unknown }}
| '''End of Activity''' }}
| style="width:33.33%; text-align:center; vertical-align:middle; padding:0.25em 0;" |
'''{{#titleparts:{{FULLPAGENAME}}|1|2|:}}'''<br /><span style="display:none;">{{#if:{{{publishdate|}}}|{{#if:{{#show: {{FULLPAGENAME}} | ?Publish date }}||{{#set: Publish date={{{publishdate}}} }} }} }}</span>
{{#if:{{{publishdate|}}}|
{{#if: {{#time:U|{{{publishdate}}}}}
| {{#ifexpr: {{#time:U|{{{publishdate}}}}} >= {{#time:U}}
  | Upcoming: {{{publishdate}}}
  | Released: {{{publishdate}}}
  }}
| Release date: Unknown }}
| Release date: Unknown }}
| style="width:33.33%; text-align:right; vertical-align:middle; padding:0.25em 0;" |
{{#if:{{{Next|{{{NextTitle|}}}}}}|
''Next''<br />
'''[[Update:{{{Next|{{{NextTitle|}}}}}}|{{#titleparts:{{{Next|{{{NextTitle|}}}}}}|1|2|:}}]]'''<br />
{{#if: {{#show: Update:{{{Next|{{{NextTitle|}}}}}} | ?Publish date }}
| {{#if: {{#time:U|{{#show: Update:{{{Next|{{{NextTitle|}}}}}} | ?Publish date#ISO }}}}
  | {{#ifexpr: {{#time:U|{{#show: Update:{{{Next|{{{NextTitle|}}}}}} | ?Publish date#ISO }}}} >= {{#time:U}}
    | Upcoming: {{#show: Update:{{{Next|{{{NextTitle|}}}}}} | ?Publish date }}
    | Released: {{#show: Update:{{{Next|{{{NextTitle|}}}}}} | ?Publish date }}
    }}
  | Release date: Unknown }}
| Release date: Unknown }}
|}}
|}
</div>
<noinclude>
<noinclude>
__NOFACTBOX__
{{/Doc}}
<templatedata>
[[Category:Templates]]
{
  "description": "Previous/current/next navigator for Update: pages. Auto-pulls prev/next dates via SMW (Property:Publish date). Self-annotates the current page's date when 'publishdate' is provided. Hides the 'Update:' prefix in visible labels and shows 'End of Activity' when there is no previous page.",
  "format": "block",
  "params": {
    "Prev": {
      "label": "Previous Update Title",
      "description": "Title of the previous update page (without the 'Update:' prefix). If 'Update:' is included, it will be hidden in the label.",
      "type": "string",
      "example": "SpiritVale Playtest 0.1.3",
      "required": false,
      "suggested": true,
      "aliases": ["PrevTitle"]
    },
    "publishdate": {
      "label": "Publish Date (Current Page)",
      "description": "Human-readable date for the current page (e.g., 'August 7, 2025'). Used to set SMW Property:Publish date if not already set, and to show Upcoming/Released.",
      "type": "string",
      "example": "August 7, 2025",
      "required": false,
      "suggested": true
    },
    "Next": {
      "label": "Next Update Title",
      "description": "Title of the next update page (without the 'Update:' prefix). If 'Update:' is included, it will be hidden in the label.",
      "type": "string",
      "example": "SpiritVale Playtest 0.1.4",
      "required": false,
      "suggested": true,
      "aliases": ["NextTitle"]
    }
  },
  "paramOrder": ["Prev", "publishdate", "Next"]
}
</templatedata>
</noinclude>
</noinclude>

Latest revision as of 04:55, 25 February 2026

Previous
No Previous Updates
PatchNav
Release date: Unknown
Next
No Further Updates

This template renders a simple Previous / Current / Next navigator for patch notes and stores Semantic MediaWiki properties on the current page.

Usage

{{PatchNav|Prev=SpiritVale Playtest 0.3.4|publishdate=2026-02-24|blurb=Short summary of the patch|Next=SpiritVale Playtest 0.4.0}}

Parameters

Parameter Description
Prev Previous patch title (page title without namespace). Alias: PrevTitle.
publishdate Date string displayed in the center; also stored as Semantic property Publish date as Y-m-d.
blurb Optional short summary; stored as Semantic property Patch blurb (not displayed yet).
Next Next patch title (page title without namespace). Alias: NextTitle.

Semantic MediaWiki behavior

  • The center column (Template:PatchNav/Current) stores:
    • Publish date (normalized to Y-m-d via #time)
    • Patch blurb (if provided)
  • The left/right columns (Template:PatchNav/Prev / Template:PatchNav/Next) read the target page’s Publish date using #show.
  • Prev/Next links assume the target pages live in the Update: namespace (for example Update:SpiritVale Playtest 0.3.4).

Styling

PatchNav uses the sitewide SV primitives from Common.css:

  • sv-card for the container

A helper class (sv-pnav__grid) is included so Mobile.css can later stack the three columns if desired.

TemplateData

Simple prev/current/next navigator. Accepts publishdate/blurb; publishdate is displayed and stored as SMW Publish date; blurb is stored for later use.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
PrevPrev PrevTitle

no description

Stringoptional
publishdatepublishdate

no description

Stringoptional
blurbblurb

no description

Stringoptional
NextNext NextTitle

no description

Stringoptional

Internal templates (reference only)

These subtemplates are used internally by PatchNav; their TemplateData was moved here for reference.

{"PatchNav/Current":{"description":"Center column: stores Publish date (Y-m-d) and Patch blurb on the current page; displays the provided date string.","params":{"publishdate":{"type":"string"},"blurb":{"type":"string"}}}}
{"PatchNav/Next":{"description":"Next column. Assumes target is in the Update: namespace.","params":{"page":{"type":"string","description":"Page title without namespace (e.g., SpiritVale Playtest 0.4.0)"}}}}
{"PatchNav/Prev":{"description":"Prev column. Assumes target is in the Update: namespace.","params":{"page":{"type":"string","description":"Page title without namespace (e.g., SpiritVale Playtest 0.3.4)"}}}}