Template:UI/workshops library

From Miniscope
Jump to: navigation, search

Curated Workshops directory page. Drop

Workshops

Hands-on training workshops — past, present, and upcoming.

3
Workshops
3
Upcoming

into a content page (e.g. the

wiki's Workshops page) to render a grid of every page in Category:Workshop, descending by start date.

Renders, top to bottom:

  • Header — h1 title + lead paragraph + a stat strip showing
 total workshop count and total participants-this-year (best-effort,
 derived from upcoming-this-year query).
 sorted descending by Has start date (newest first),
 rendered via Template:UI/upcoming_events_featured/card.

Why reuse the featured card

The featured card already encapsulates the workshop card visual (image, eyebrow, title, tagline, status badge, contextual CTAs) and its date-aware behavior (Apply now only when applications are open, View recording only on past workshops, Learn more always). The workshops library composes N of those cards into a responsive grid without re-implementing any of that.

Single source of truth for the card means a future visual change — say, swapping the gradient overlay or moving the badge — happens in one place and updates both the main-page featured slot and the directory.

Sort order

Descending by Has start date puts the most recent workshop first. This works for both the typical "find the next one" case (newest upcoming workshop sits at the top) and the archival "browse what we've run" case (most recent past workshops are above older ones). Ties (two workshops with identical start dates) break by SMW's default order, which is fine — same-day workshops are vanishingly rare in practice.

Sort is single-property by design. SMW's multi-property sort= behaves as an inner join: a page missing ANY of the listed properties is excluded from results, regardless of how many other properties it has. An earlier version used sort=Has start date,Has name for stable tiebreak ordering, but Has name isn't a Workshop field — every workshop fell out of the result set even though Has start date was set, so the directory showed empty while the KPI count still showed N.

A future enhancement might split into "Upcoming" and "Past" sections; for now the per-card status badge does that work visually within a single chronological flow.

Parameters (all optional)

  • heading — page heading (default: "Workshops"). Empty
 string suppresses the <h1>.
  • lead — short intro paragraph below the heading
 (default: a generic explainer).
  • limit — how many workshops to load (default: 50).
 Workshops are typically rare enough — a few per year — that 50
 comfortably covers many years of history; bump for established
 programs.

Cross-template dependencies

 card renderer (image, eyebrow, status badge, CTAs).