Template:Hansard-mp-record-month
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.