Template:Color box party
Appearance
This template displays one or more colour boxes in the colours of political parties, using the party names. It is a shorthand for (repeated) {{color box|{{party color|...}}}}.
Usage
[edit]{{color box party|Party 1|Party 2|Party 3|...}}
{{color box party|Party 1|Party 2|border=darkgray}}
Each unnamed parameter is a party name exactly as {{Party color}} expects it. Up to eight parties are supported. Boxes are shown in the order given, separated by a single space.
Parameters
[edit]| Parameter | Required | Description |
|---|---|---|
1 | Yes | Name of the first party, passed to {{Party color}}. |
2 to 8 | No | Names of further parties. Empty values are skipped, and parties beyond the eighth are silently ignored. Boxes are separated by  . |
border | No | Border colour applied to every box, passed to {{Color box}} (for example border=darkgray). If omitted, {{Color box}} uses its own default. |
Examples
[edit]| Code | Result |
|---|---|
{{color box party|Moderate Party}} |
|
{{color box party|Swedish Social Democratic Party|Moderate Party}} |
|
{{color box party|Moderate Party|border=darkgray}} |
|
{{color box party|Swedish Social Democratic Party|Moderate Party|border=darkgray}} |
Equivalent old form
[edit]{{color box|{{party color|Swedish Social Democratic Party}}}} {{color box|{{party color|Moderate Party}}}}
{{color box|{{party color|Moderate Party}}|border=darkgray}}
becomes
{{color box party|Swedish Social Democratic Party|Moderate Party}}
{{color box party|Moderate Party|border=darkgray}}
TemplateData
[edit]This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Color box party in articles based on its TemplateData.
TemplateData for Color box party
Displays one or more colour boxes in the colours of political parties, given only the party names.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Party 1 | 1 | Name of the first party, as used by Template:Party color.
| String | required |
| Party 2 | 2 | Name of the second party. | String | optional |
| Party 3 | 3 | Name of the third party. | String | optional |
| Party 4 | 4 | Name of the fourth party. | String | optional |
| Party 5 | 5 | Name of the fifth party. | String | optional |
| Party 6 | 6 | Name of the sixth party. | String | optional |
| Party 7 | 7 | Name of the seventh party. | String | optional |
| Party 8 | 8 | Name of the eighth party. | String | optional |
| Border | border | Border colour applied to every box, passed to Template:Color box.
| String | optional |
Supporting templates
[edit]- {{Color box}}: the underlying colour box
- {{Party color}}: looks up the colour for a party name