Template:Category/Event
Render template for Category:Event pages.
Called by the SemanticSchemas dispatcher when a page belongs to Category:Event (or any Event subclass — Workshop has its own Template:Category/Workshop which fires instead by virtue of being more specific). Renders an event-shaped masthead: type/status chip eyebrow, big date+time line, location, optional topic + description, action chips, and a Details list. Below this, the SemanticSchemas auto-rendered Activity footer surfaces any pages that link here (since Event extends Activity).
Renders, top to bottom:
- Banner — Has banner (3:1) or Has card image (4:3 fallback);
optional. Capped via CSS max-height so a 4:3 listing image doesn't dominate the page header.
- Masthead:
- Eyebrow — Event Type chip + status chip (the latter only
renders for non-default states: Cancelled, Completed, Pending, or the derived Past/Happening-now state).
- When — Template:UI/datetime in long_datetime format,
"Jul 12, 2026 · 10:00 AM PDT". For multi-day events, renders as a "Jul 12 – Jul 14, 2026" range and drops the time (matches the Template:UI/upcoming_events_list/row convention — a range carries the temporal cue; the start hour gets crowded out). For date-only events (time component is 00:00), shows just the date — no spurious "12:00 AM PDT".
- Where — Has location values, comma-joined.
- Topic — Has event topic, in muted italics, if set.
- Description — Has description as an accent-bordered italic
lead paragraph.
- Action chips — Website (Has website), Project (Has project
page), External link, etc. Each only renders when its source property is set.
- Details list — Type, When, Where, Presenter, Participants,
Project, Attachments, Status. Repeats the masthead's facts in a structured list for scannability (matches the Workshop page's "Workshop details" idiom — viewer can scroll to the list for the full property breakdown).
Why we don't show a hero banner-with-overlay like Workshop
Events are smaller-scale than workshops (a one-hour seminar, a recurring office-hour). Treating every weekly office-hour like a month-long workshop with a darkened-image hero is visually heavy and overpromises. A flat masthead reads as "scheduled event" while the banner image (when set) sits as a separate strip — proportional to the surface's actual weight.
Status state machine
Priority order (first match wins):
cancelled— Has event status == Cancelledcompleted— Has event status == Completedpending— Has event status == Pendingpast— derived from dates: today > end_date
(falls back to today > start_date when end is unset)
now— start_date ≤ today ≤ end_date (only when end is
set; otherwise a one-day event past start_date falls through to
past)
scheduled— fall-through (upcoming, default)
The scheduled state renders NO chip (zero-noise default).
All other states render a small colored chip in the eyebrow.
Date+time presentation logic
The masthead's "When" line follows this cascade:
- If end date is set AND its calendar date differs from start's →
render "Jul 12 – Jul 14, 2026" (range, no time). Multi-day events typically span multiple workshop sessions; surfacing the start hour would imply "starts at 10am on the 12th" which is informative but visually busy. The detail list still shows both ISO timestamps for anyone who needs the precise start time.
- Else if start has a time component (H:i ≠ 00:00) → render full
long_datetime via Template:UI/datetime → "Jul 12, 2026 · 10:00 AM PDT". The TZ label and visitor-local upgrade come for free from the helper.
- Else (single-day, no time) → render month_day_year only →
"Jul 12, 2026". No spurious "12:00 AM PDT" on a date-only event.
Properties (snake_case from dispatcher)
has_event_type— required; eyebrow chip + details listhas_event_status— Scheduled / Completed / Cancelled /
Pending (drives the status chip)
has_event_topic— optional subtitle linehas_start_date— required; ISO datetime from
labki-datetime
has_end_date— optional; ISO datetimehas_location— comma-joined string from the dispatcherhas_presenter— comma-joined stringhas_participant— comma-joined stringhas_project— comma-joined stringhas_website— comma-joined URL stringhas_attachment— comma-joined File-namespace title
string
has_description— paragraph blurbhas_banner— File-namespace page (3:1 hero strip)has_card_image— File-namespace page (4:3 fallback)