Template:UI/upcoming events featured

From Miniscope
Jump to: navigation, search

Featured-event hero card for an "Upcoming events" two-column section on a main page. Designed to sit alongside Template:UI/upcoming_events_list inside a .wiki-feed-columns wrapper (the same two-column grid the recent_activity / recent_discussions feeds use), but renders fine on its own too.

Zero-config auto-pick: the featured workshop is the one whose application close date is closest to today without being in the past. The query is >=2026-05-12 sorted ascending by close date with limit 1. As each workshop's application window closes, it falls out of the result set and the next one rises up — no main-page edits required.

Why "next-to-close" rather than "next-to-start": application-close timing is the user-facing deadline pressure that the featured card should surface. A workshop starting in 8 months whose applications close next week is more urgent to feature than one starting in 2 months whose applications closed last week.

Workshops without Has application close date set don't match the filter and won't auto-feature. If a workshop should feature without an application deadline (e.g. open enrollment), set the close date to a far-future placeholder, or call Template:UI/upcoming_events_featured/card directly with the page title.

Rendering

The matched workshop's title is passed via SMW format=template to Template:UI/upcoming_events_featured/card, which renders the card markup — image, eyebrow (month + year of Has start date), title, tagline (Has description), and CTA buttons (Apply now → Has registration url; Learn more → the workshop page).

When the query returns zero matches (no upcoming workshops with open applications), the empty-state placeholder renders here at the dispatcher level — kept on this side so it shows up exactly when auto-pick has nothing to feature, not when /card is called directly with a bad arg.

Params: none. Direct callers wanting to override the auto-pick should

invoke

instead.