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:PatchHighlights: Difference between revisions

Template page
Created page with "<div style="display:grid; grid-template-columns:repeat(3,1fr); gap:1rem; grid-auto-rows:auto; align-items:start; width:100%;"> {{#ask: Namespace::Update Publish date::+ | sort=Publish date | order=desc | limit=3 | ?Publish date | ?Patch blurb | format=template | template=PatchHighlights | named args=yes }} </div> <includeonly> <div style="text-align:left; padding:1rem 1.5rem 0.75rem;"> <div style="font-size:1.4em; font-weight:700; line-height:1.2; marg..."
Tag: wikieditor
 
m Protected "Template:PatchHighlights" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
Tags: mobile web edit mobile edit
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div style="display:grid; grid-template-columns:repeat(3,1fr); gap:1rem; grid-auto-rows:auto; align-items:start; width:100%;">
<templatestyles src="Template:PatchHighlights/styles.css" />
{{#ask:
<div class="sv-card sv-ph-wrap"><div class="sv-tile sv-ph-head">Recent Updates</div><div class="sv-ph-pad"><div class="sv-ph-grid">{{#ask:
[[Namespace::Update]]
[[Category:Patch Notes]]
[[Publish date::+]]
[[Publish date::+]]
| sort=Publish date
| sort=Publish date,Modification date
| order=desc
| order=desc,desc
| limit=3
| limit=3
| ?Publish date
| ?Publish date
| ?Patch blurb
| ?Patch blurb
| format=template
| ?Modification date
| template=PatchHighlights
| format=template
| named args=yes
| template=PatchHighlights/Card
}}
| named args=yes
</div>
| mainlabel=Page
 
| link=none
<includeonly>
| searchlabel=
<div style="text-align:left; padding:1rem 1.5rem 0.75rem;">
| default=<div class="sv-ph-empty">No recent updates found.</div>
<div style="font-size:1.4em; font-weight:700; line-height:1.2; margin:-0.2em 0 0.3em 0;">
}}</div></div></div>
[[{{{1}}}|{{#titleparts:{{{1}}}|1|2|:}}]]
</div>
<div style="margin:.1em 0; font-size:.85em; font-style:italic; color:var(--text-color);">
{{{Publish date}}}
</div>
{{#if:{{{Patch blurb|}}}|<p style="font-size:.9em; line-height:1.75em; color:var(--text-color); margin:.3em 0 0 0;">{{{Patch blurb}}}</p>|}}
</div>
</includeonly>
 
<noinclude>
<noinclude>
<templatedata>
{{/Doc}}
{
  "description": "Displays the three most recent Update: pages using SMW. Each card shows the page title (without the Update: prefix), its Publish date, and an optional Patch blurb.",
  "params": {
    "1": { "label": "Page", "description": "The update page (passed automatically by SMW)", "type": "wiki-page-name", "required": true },
    "Publish date": { "label": "Publish date", "description": "The SMW Publish date property value", "type": "string", "required": false },
    "Patch blurb": { "label": "Patch blurb", "description": "Optional short summary set on the update page with [[Patch blurb::...]]", "type": "string", "required": false }
  }
}
</templatedata>
 
[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Latest revision as of 04:54, 25 February 2026

<templatestyles src="Template:PatchHighlights/styles.css" />

Recent Updates
{{#ask:

Publish date::+ | sort=Publish date,Modification date | order=desc,desc | limit=3 | ?Publish date | ?Patch blurb | ?Modification date | format=template | template=PatchHighlights/Card | named args=yes | mainlabel=Page | link=none | searchlabel=

| default=
No recent updates found.
}}

This template displays the three most recent patch notes as a compact highlight grid (Main Page friendly). It queries pages in Category:Patch Notes via Semantic MediaWiki and renders each result using Template:Tl.

Requirements

Patch note pages should be in Category:Patch Notes and define these Semantic properties:

  • Publish date
  • Patch blurb (optional)
  • Modification date (fallback date when Publish date is missing)

Output behavior

  • Desktop: up to 3 items.
  • Tablet (<=1024px): 2 items.
  • Mobile (<=640px): 1 item (newest).

If no results are found, it shows “No recent updates found.”

Styling

Loads <templatestyles src="Template:PatchHighlights/styles.css" /> and uses global SV primitives from Common.css:

  • sv-card (outer wrapper)
  • sv-tile (header band + each highlight item)

Customization

To change how many results appear, edit the main template and adjust | limit=3. To change the card layout, edit Template:PatchHighlights/Card

TemplateData

<templatedata>{"description":"Displays the three most recent patch notes as a highlight grid (Main Page friendly).","params":{}}</templatedata>