Template:Hansard-mp-record-month

Revision as of 18:10, 15 July 2026 by SGPolitico (talk | contribs) (Created page with "<includeonly><div class="mw-collapsible mw-collapsed" style="margin:0.2em 0 0.2em 1.5em;border:1px solid #c8ccd1;"><div style="background:#eaecf0;padding:0.25em 0.6em;font-weight:bold;">{{{MonthLabel|{{{YearMonth|}}}}}}</div><div class="mw-collapsible-content">{{#cargo_query:tables=hansard_items,hansard_sittings|join on=hansard_items.sitting_id=hansard_sittings.sitting_id|fields=hansard_items.sitting_date=Date,hansard_items.item_type=Type,hansard_items.subject=Subject,CO...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Usage

Not called directly. Invoked automatically by the outer month-grouping {{Hansard-item-cargo}} query on each MP's Parliamentary Record section, via format=template|template=Hansard-mp-record-month|named args=yes. One call is generated per distinct month that has data for that MP.

Parameters

Parameter Source Notes
YearMonth DATE_FORMAT(sitting_date,"%Y-%m") from the outer query e.g. 2026-07. Used to filter the inner query and as fallback heading text.
MonthLabel DATE_FORMAT(sitting_date,"%M %Y") from the outer query e.g. July 2026. Human-readable heading, preferred over YearMonth when present.
MPId Literal string passed by the outer query (e.g. "cai-yinzhou"=MPId) Must match the mp_id used in the outer query's WHERE clause.

Renders a collapsed accordion, one per month, each containing its own sortable {{Hansard-item-cargo}}-sourced table for that MP in that month.