Jump to content

Template:Memory: Difference between revisions

From LovedForever
Deploy Group A (Request 5): photo now renders above message text, wrapped for Read More collapse
Stories tribute: add Notes and Candle options
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div class="memory-entry">
<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>}}


{{#if:{{{photo|}}}|[[File:{{{photo}}}|thumb|{{{caption|}}}]]}}
{{#if:{{{photo|}}}|[[File:{{{photo}}}|thumb|{{{caption|}}}]]}}
<div class="memory-message">{{{message|}}}</div>
<div class="memory-message">{{{message|}}}</div>
</div>
</div>
</div>
----
----
Line 18: Line 19:
a "Read More" toggle (see <code>MediaWiki:Common.css</code> for the collapsed
a "Read More" toggle (see <code>MediaWiki:Common.css</code> for the collapsed
styling) without also catching the name/date header or the photo.
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
<code>.memory-tribute-badge</code>/<code>.memory-content</code> in
<code>MediaWiki:Common.css</code>) — not inline text next to the name.
Unset or unrecognized values render nothing at all (the <code>#switch</code>
default is empty, so no badge <code>&lt;div&gt;</code> is emitted and no
empty column appears), so every entry saved before this parameter existed
keeps rendering exactly as before.


<templatedata>
<templatedata>
Line 34: Line 44:
"type": "string",
"type": "string",
"required": true
"required": true
},
"tribute": {
"label": "Tribute (optional)",
"description": "A tribute icon shown as a badge beside your entry.",
"type": "string",
"suggestedvalues": ["flowers", "fruits", "car", "house", "money", "notes", "candle"],
"required": false
},
},
"photo": {
"photo": {
Line 53: Line 70:
}
}
},
},
"paramOrder": ["name", "message", "photo", "caption", "date"]
"paramOrder": ["name", "message", "tribute", "photo", "caption", "date"]
}
}
</templatedata>
</templatedata>
</noinclude>
</noinclude>

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