This is a documentation subpage for Template:Canadian election result/top. It may contain usage information, categories and other content that is not part of the original template page. |
This template is used on approximately 17,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
TemplateData
editTemplateData for Canadian election result/top
The header for a table of the Canadian election results
Parameter | Description | Type | Status | |
---|---|---|---|---|
Jurisdiction | 1 | The two-letter code for a province/territory, the three-letter code for a city, or CA for federal.
| Line | required |
Election | 2 | The four-digit year for a general election, or some other text (for example a full date) for a by-election.
| Line | required |
Riding | 3 | The full title of a Wikipedia article about a riding. For example: 'Barrie (electoral district)'
| Line | optional |
Riding display | 4 | The displayed text for the riding name, if different from the above. For example: 'Barrie'.
| Line | optional |
By-election | by | Set to 'yes' for by-elections. When using this, give the full date of the by-election rather than just the year.
| Line | optional |
By-election link | by-link | Pagename for by-election.
| Page name | optional |
Reason | reason | Text describing reason for by-election, added on line below main title. For example: 'Resignation of [[Bugs Bunny]]'
| Line | optional |
Add percent column | percent | Set to 'yes' to add a column with the heading '%'.
| Line | optional |
Add change column | change | Set to 'yes' to add a column with the heading '±%'.
| Line | optional |
Add expenditures column | expenditures | Set to 'yes' to add a column with the heading 'Expenditures'.
| Line | optional |
Add elected column | elected | Set to 'yes' for ridings that elect multiple members off of one ballot to add a column for with the heading 'Elected'.
| Line | optional |
Add 1st ballot column | 1st | Set to 'yes' for ridings with multiple-rounds of voting to create a column for the first round of voting.
| Line | optional |
Add final ballot column | final | Set to 'yes' for ridings with multiple-rounds of voting to create a column for the final round of voting.
| Line | optional |
Add second percent column | percent2 | Set to 'yes' for ridings with multiple-rounds of voting to add a column for percents for the final round.
| Line | optional |
Mark as multi-ballot riding | ballot | Set to A, B, or C for ridings that run multiple ballots each with a different slate of candidates during each election. It will only change the links in the heading.
| Line | optional |
''Future'' election date | on | The date of an upcoming election “YYYY-MM-DD” (or other machine interpretable date) to add a coloured title line “The YYYY general/municipal election will be held on Month day.” or (if parameter by=yes) “The by-election will be held on Month day, year.”
| String | optional |
Note results ''Preliminary'' | prelim | Setting any value other than “no” adds the large title line “ ** Preliminary results — Not yet official ** ”
| Line | optional |
collapsed | collapsed | The table is by default collapsible. You can set the initial collapsedness to 'yes', 'auto', or 'no'. These correspond to initial states of 'collapsed', 'autocollapse', or 'none', respectively. For instance, if an article about a riding has a long list of election results from years past, you may want to have the first one display (for the most recent election) but keep the previous election years collapsed.
| Line | optional |