Difference between revisions of "Template:Election winner list with party link"
Jump to navigation
Jump to search
imported>PinkPanda272 (column spacing) |
imported>PinkPanda272 m |
||
| Line 1: | Line 1: | ||
| + | <noinclude>{| class="wikitable"</noinclude> | ||
! class="vcard" scope="row" style="text-align: left;" {{#switch: {{{numbered}}}|yes={{!}}{{{area_number|}}}|no=|{{!}}{{{area_number|}}}}} | ! class="vcard" scope="row" style="text-align: left;" {{#switch: {{{numbered}}}|yes={{!}}{{{area_number|}}}|no=|{{!}}{{{area_number|}}}}} | ||
| − | | {{{area | + | | {{{area}}} |
| − | | {{{rep | + | | {{{rep}}} |
| style="width: 5px; background-color:{{Template:{{{party}}}/meta/color}}"| | | style="width: 5px; background-color:{{Template:{{{party}}}/meta/color}}"| | ||
| [[{{{party}}}|{{Template:{{{party}}}/meta/shortname}}]] {{{result|}}} | | [[{{{party}}}|{{Template:{{{party}}}/meta/shortname}}]] {{{result|}}} | ||
| − | |-<noinclude>{{documentation}}</noinclude> | + | |-<noinclude> |
| + | |} | ||
| + | {{documentation}}</noinclude> | ||
Revision as of 18:19, 5 December 2020
| {{{area}}} | {{{rep}}} | [[{{{party}}}|{{Template:{{{party}}}/meta/shortname}}]] |
Usage
Creates a summary of elected representatives in a parliamentary/municipal election, where there are multiple wards or constituencies. This template creates an individual rows, use {{Election winner list begin}} for the header, or {{Election winner list without party link}} to display candidates representing parties without a Wikipedia article.
Blank Template
{{Election winner list with party link
|area_number =
|area =
|rep =
|party =
|result =
|numbered = yes/no
}}
Example
Inserting...
{{Election winner list begin
|title = Example Election
|area_name = Constituency
|rep_name = MP
|result_name = Result
|numbered = yes
}}}
{{Election winner list with party link
|area_number = 1
|area = [[Holborn and St Pancras (UK Parliament constituency)|Holborn and St Pancras]]
|rep = [[Keir Starmer]]
|party = Labour Party (UK)
|result = hold
}}
{{Election winner list with party link
|area_number = 2
|area = [[Uxbridge and South Ruislip (UK Parliament constituency)|Uxbridge and South Ruislip]]
|rep = [[Boris Johnson]]
|party = Conservative Party (UK)
|result = hold
}}
{{End}}
Produces...
| Constituency | MP | Result | ||
|---|---|---|---|---|
| 1 | Holborn and St Pancras | Keir Starmer | Labour hold | |
| 2 | Uxbridge and South Ruislip | Boris Johnson | Conservative hold | |
| The above documentation is transcluded from Template:Election winner list with party link/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |