Jump to content

Template:Memory: Difference between revisions

From LovedForever
Badge-layout restyle for the tribute icon (Request 7 follow-up, bundled with Request 8)
Stories tribute: add Notes and Candle options
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<div class="memory-entry">{{#switch:{{{tribute|}}}|flowers=<div class="memory-tribute-badge" title="Flowers">💐</div>|fruits=<div class="memory-tribute-badge" title="Fruits">🍎</div>|car=<div class="memory-tribute-badge" title="Car">🚗</div>|house=<div class="memory-tribute-badge" title="House">🏠</div>|money=<div class="memory-tribute-badge" title="Money">💰</div>|#default=}}<div class="memory-content">
<div class="memory-entry">{{#switch:{{{tribute|}}}|flowers=<div class="memory-tribute-badge" title="Flowers"><span class="lf-ticon lf-ticon-flowers"></span></div>|fruits=<div class="memory-tribute-badge" title="Fruits">🍎</div>|car=<div class="memory-tribute-badge" title="Car"><span class="lf-ticon lf-ticon-car"></span></div>|house=<div class="memory-tribute-badge" title="House"><span class="lf-ticon lf-ticon-house"></span></div>|money=<div class="memory-tribute-badge" title="Money"><span class="lf-ticon lf-ticon-money"></span></div>|notes=<div class="memory-tribute-badge" title="Notes"><span class="lf-ticon lf-ticon-notes"></span></div>|candle=<div class="memory-tribute-badge" title="Candle"><span class="lf-ticon lf-ticon-candle"></span></div>|#default=}}<div class="memory-content">
'''{{{name|A Visitor}}}'''{{#if:{{{date|}}}| <span class="memory-date">— {{{date}}}</span>}}
'''{{{name|A Visitor}}}'''{{#if:{{{date|}}}| <span class="memory-date">— {{{date}}}</span>}}


Line 49: Line 49:
"description": "A tribute icon shown as a badge beside your entry.",
"description": "A tribute icon shown as a badge beside your entry.",
"type": "string",
"type": "string",
"suggestedvalues": ["flowers", "fruits", "car", "house", "money"],
"suggestedvalues": ["flowers", "fruits", "car", "house", "money", "notes", "candle"],
"required": false
"required": false
},
},

Latest revision as of 23:25, 1 October 2026

A Visitor



This template renders one guestbook/memory entry. Used via the "Add a Memory" link on a memorial page — visitors shouldn't normally need to type this by hand.

The photo (when present) renders above the message text, not below it (Devin's request) -- so the photo line comes first in this template, right after the name/date header.

The message is wrapped in its own .memory-message div so MediaWiki:Common.js can measure and collapse long entries behind a "Read More" toggle (see MediaWiki:Common.css for the collapsed styling) without also catching the name/date header or the photo.

The tribute icon (when set) renders once, as its own left-column badge block beside the name/date/message content (see .memory-tribute-badge/.memory-content in MediaWiki:Common.css) — not inline text next to the name. Unset or unrecognized values render nothing at all (the #switch default is empty, so no badge <div> is emitted and no empty column appears), so every entry saved before this parameter existed keeps rendering exactly as before.

One guestbook/memory entry, used via the "Add a Memory" flow on a memorial page.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Your namename

How you'd like to be identified with your memory.

Linerequired
Your memory or messagemessage

Share a story, memory, or message.

Stringrequired
Tribute (optional)tribute

A tribute icon shown as a badge beside your entry.

Suggested values
flowers fruits car house money notes candle
Stringoptional
Photo (optional)photo

An uploaded photo to include with your memory.

Fileoptional
Photo caption (optional)caption

no description

Lineoptional
Date (optional)date

E.g. "September 2026" — leave blank if unsure.

Lineoptional