Template:Category/Workshop itinerary/day
Per-day block for Template:Category/Workshop itinerary. Do not transclude directly outside the itinerary template.
Receives the workshop page name and a 0-indexed day offset. Computes
the calendar date for that offset relative to the workshop's
Has start date, suppresses itself when the offset exceeds
the workshop's Has end date (so a 3-day workshop only
emits offsets 0–2 even though the parent template invokes 0–6), and
runs an inline #ask with a date-range filter to fetch
that day's schedule entries.
Subobject query model
Schedule entries live as subobjects on Workshop session pages. The
#ask queries Category:Schedule entry
directly and uses -Has subobject property chains to
filter and project fields from the parent Workshop session page (see
the actual query below for the full list of filters and projections).
Empty days (offset within range, but no sessions scheduled) are skipped entirely — a participant handout shouldn't carry a "Day 2 — no sessions" header that confuses readers about whether it's a free day or just missing data. Admins should add a "Free day"-typed Schedule entry if a day is intentionally empty.
Date arithmetic uses Unix timestamps to sidestep date-string ambiguity:
parse start_date to U, add offset * 86400 seconds, format
back to Y-m-d.
Optional filters
group— Participant group page name. When set, the
#askaddsso the filtered view shows both group-specific sessions AND everyone-attended sessions. Convention: each workshop has a<Workshop name> All Participantsparticipant-group page that's the target ofHas participant groupon every-attended deliveries.
presenter— Person page name. When set, filters to
Schedule entries whose parent Workshop session's
Has presenter matches.
ta— Workshop organizer page name. When set, filters
to Schedule entries whose Has TA matches.
All filters can be combined. Presenter and TA filters together cover "what am I doing today" for an organizer with both roles.
Why we project Parent/Groups twice (linked + raw)
The row template needs the parent Workshop session page name to do
per-row #show lookups (Has session type, Has session
topic, Has presenter, Has workshop, etc.). Inverse-chain projections
(?-Has subobject.X) and forward chains
(?Has X.Y) misalign per-row when multiple subobjects
share a parent — values from one subobject's parent leak into another
row's slot. So we project only the direct parent reference here, and
let the row template chain forward via #show calls
keyed on the raw page name.
Parent— wikilink form, used as the rendered titleParentRaw— bare page name (#-output
format strips the link), used to feed #show
Same pattern for participant groups:
Groups— comma-joined wikilinks (currently unused;
reserved for if we ever want to render group chips as links)
GroupsRaw— bare page name(s); the row template uses
these to #show Display label per group
Timezone handling
SMW normalizes Date values to UTC internally — the per-session offset
that labki-datetime stores in wikitext (+02:00
suffix etc.) does NOT survive the round-trip through SMW's storage.
?Has start date#-F[H:i] therefore projects the UTC time,
not the originally-typed local time.
To recover the local time, the row template fetches the workshop's
Has timezone offset (a Number — hours from UTC, e.g. 2 for
Paris CEST, -7 for LA PDT, 5.75 for Nepal) via per-row #show
on ParentRaw and routes the value through
Template:Category/Workshop itinerary/local-time for pure integer
arithmetic on H and i (no Unix timestamps, no strtotime). See the row
template for details.
The same Has timezone offset drives the day-header label
here, formatted as UTC(+2) / UTC(-7) /
UTC. When Has timezone offset is empty, the
day-header label span is empty.
DST limitation: a single workshop-level offset can't represent a workshop that crosses a DST boundary. Acceptable for v1 (most workshops fit inside a single DST regime).
Parameters:
workshop— Workshop page name (e.g. "2026 Paris Workshop")offset— 0 for day 1, 1 for day 2, etc.group,presenter,ta— optional filters (see above)