Template:Memory: Difference between revisions
Deploy Group A (Request 5): photo now renders above message text, wrapped for Read More collapse |
Request 7: single tribute icon next to sender name on entries |
||
| Line 1: | Line 1: | ||
<div class="memory-entry"> | <div class="memory-entry"> | ||
'''{{{name|A Visitor}}}'''{{#if:{{{date|}}}| <span class="memory-date">— {{{date}}}</span>}} | '''{{{name|A Visitor}}}'''{{#switch:{{{tribute|}}}|flowers= <span class="memory-tribute-icon" title="Flowers">💐</span>|fruits= <span class="memory-tribute-icon" title="Fruits">🍎</span>|car= <span class="memory-tribute-icon" title="Car">🚗</span>|house= <span class="memory-tribute-icon" title="House">🏠</span>|money= <span class="memory-tribute-icon" title="Money">💰</span>|#default=}}{{#if:{{{date|}}}| <span class="memory-date">— {{{date}}}</span>}} | ||
{{#if:{{{photo|}}}|[[File:{{{photo}}}|thumb|{{{caption|}}}]]}} | {{#if:{{{photo|}}}|[[File:{{{photo}}}|thumb|{{{caption|}}}]]}} | ||
| Line 18: | Line 18: | ||
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, right after the name — not | |||
repeated, and not between the name and the message. Unset or unrecognized | |||
values render nothing (the <code>#switch</code> default is empty), so every | |||
entry saved before this parameter existed keeps rendering exactly as before. | |||
<templatedata> | <templatedata> | ||
| Line 34: | Line 39: | ||
"type": "string", | "type": "string", | ||
"required": true | "required": true | ||
}, | |||
"tribute": { | |||
"label": "Tribute (optional)", | |||
"description": "A small tribute icon shown next to your name.", | |||
"type": "string", | |||
"suggestedvalues": ["flowers", "fruits", "car", "house", "money"], | |||
"required": false | |||
}, | }, | ||
"photo": { | "photo": { | ||
| Line 53: | Line 65: | ||
} | } | ||
}, | }, | ||
"paramOrder": ["name", "message", "photo", "caption", "date"] | "paramOrder": ["name", "message", "tribute", "photo", "caption", "date"] | ||
} | } | ||
</templatedata> | </templatedata> | ||
</noinclude> | </noinclude> | ||
Revision as of 06:51, 20 September 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, right after the name — not
repeated, and not between the name and the message. Unset or unrecognized
values render nothing (the #switch default is empty), 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.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Your name | name | How you'd like to be identified with your memory. | Line | required |
| Your memory or message | message | Share a story, memory, or message. | String | required |
| Tribute (optional) | tribute | A small tribute icon shown next to your name.
| String | optional |
| Photo (optional) | photo | An uploaded photo to include with your memory. | File | optional |
| Photo caption (optional) | caption | no description | Line | optional |
| Date (optional) | date | E.g. "September 2026" — leave blank if unsure. | Line | optional |