• Home
  • Random
  • Recent changes
  • Special pages
  • Settings
  • About MOASSpedia
  • Disclaimers
MOASSpedia
  • 216.73.216.215
  • Talk
  • Watchlist
  • Contributions
  • Log in

Template:Canadian party colour/name

Template Discussion
  • Language
  • Watch
  • History
  • Edit
    • Page information
    • Permanent link
    • What links here
< Template:Canadian party colour
File:Test Template Info-Icon - Version (2).svg Template documentation[view] [edit] [history] [purge]
File:Ambox warning yellow.svgThis template is used on approximately 14,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.

This template can be used to standardize the colours used to represent Canadian political parties in tables, lists, and templates. Enter the jurisdiction and party name, and this template will produce the hex colour code for that party. In tables, this template can start a new row with one cell containing the colour and the next cell containing a wikilink to the article about that party.

A full list of available party names is at Wikipedia:WikiProject Political parties and politicians in Canada/list of parties.

Usage

  • {{Canadian party colour|Jur|Party}} to get just the hex code (for use inside other templates)
  • {{Canadian party colour|Jur|Party|background}} to get bgcolor="colour"
  • {{Canadian party colour|Jur|Party|nohash}} to get the colour without the leading #
  • {{Canadian party colour|Jur|Party|name}} to get a wikilink to the party's article
  • {{Canadian party colour|Jur|Party|name|short}} to get a shortened wikilink to party's article (for use in tables)
  • {{Canadian party colour|Jur|Party|colour&name}} to get an inline text version of the party colour followed by a wikilink to the party's article
  • {{Canadian party colour|Jur|Party|colour&name|short}} to get an inline text version of the party colour followed by a shortened wikilink to the party's article
  • {{Canadian party colour|Jur|Party|row}} to start a new row with party colour as the first cell
  • {{Canadian party colour|Jur|Party|row-name}} to start a new row with the party colour as the first cell and a wikilink to the party's article as the second cell
  • {{Canadian party colour|Jur|Party|row-name|short}} to start a new row with the party colour as the first cell and a shortened wikilink to the party's article as the second cell

Where Jur is the jurisdiction, being one of: CA, AB, BC, MB, NB, NS, NF, NL, NT, NU, ON, PE, QC, SK, YK, YT, EDM, MTL, VAN

Example

{|class="wikitable"
{{Canadian party colour|BC|NDP|row-name}}
| This is the common row-name usage.
{{Canadian party colour|MB|CoR|row-name|short}}
| Without the "short" parameter, this would have given the full name [[Manitoba Confederation of Regions Party|Confederation of Regions]].
{{Canadian party colour|BC|Liberal|row}}
| "row" allows custom text in the first cell.
| And, as usual, the second cell.
|-
| {{Canadian party colour|CA|PC|background}} | '''1867'''
| "background" allows text on the colour.
| Note that when using the "background" parameter you have to manually create new rows using |-
{{Canadian party colour|XX|Liberal|row-name}}
| This row uses "XX" for jurisdiction. Invalid jurisdictions (or jurisdictions without a party by that name) will sometimes find a default colour.
{{Canadian party colour|ON|Invalid text|row-name}}
| This row uses "Invalid text" as the party name. Invalid party names will default to the colour for independent candidates and will use the exact text entered when using the "row-name" function, including wikilinks. This can be used for parties that only ever run one candidate.
|}

Will produce:

New Democratic This is the common row-name usage.
Conf of Regions Without the "short" parameter, this would have given the full name Confederation of Regions.
  "row" allows custom text in the first cell. And, as usual, the second cell.
1867 "background" allows text on the colour. Note that when using the "background" parameter you have to manually create new rows using |-
Liberal This row uses "XX" for jurisdiction. Invalid jurisdictions (or jurisdictions without a party by that name) will sometimes find a default colour.
Invalid text This row uses "Invalid text" as the party name. Invalid party names will default to the colour for independent candidates and will use the exact text entered when using the "row-name" function, including wikilinks. This can be used for parties that only ever run one candidate.

fr:Modèle:Infobox Parti politique canadien/couleurs

The above documentation is transcluded from Template:Canadian party colour/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Subpages of this template.
Retrieved from "https://moasspedia.org/w/index.php?title=Template:Canadian_party_colour/name&oldid=7150"
Categories:
  • Pages with broken file links
  • Canada political party color templates
  • Political party name templates
Last edited on 22 March 2022, at 17:15

MOASSpedia

Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • This page was last edited on 22 March 2022, at 17:15.
  • Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • Privacy policy
  • About MOASSpedia
  • Disclaimers
  • Desktop