Template:Election box candidate with party link/doc

From MicroWiki, the free micronational encyclopædia
Jump to navigation Jump to search

Usage

Party links

A more sophisticated effect can be achieved using Template:Election box candidate with party link. This adds a link to the candidate's party and also adds a color tab to the left of the candidate. For example:

For example:

 {{Election box begin | title=[[United Kingdom general election, 2005|General Election 2005]]: Strangford}}
 {{Election box candidate with party link
   |party      = Labour Party (UK)
   |candidate  = Tony Blair
   |votes      = 9,999
   |percentage = 50.0
   |change     = +10.0
 }}
 {{Election box candidate with party link
   |party      = Conservative Party (UK)
   |candidate  = Michael Howard
   |votes      = 9,999
   |percentage = 50.0
   |change     = +10.0
 }}
 {{Election box end}}

Will create this:

General Election 2005: Strangford
Party Candidate Votes % ±%
Labour Party (UK) Tony Blair 9,999 50.0 +10.0
Conservative Party (UK) Michael Howard 9,999 50.0 +10.0

However, this does rely on some additional setup for each party. See below for more details.

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools.

TemplateData for Election box candidate with party link

A more sophisticated effect in election results tables can be achieved using this template. This adds a link to the candidate's party and also adds a color tab to the left of the candidate. See Election box begin and Election box end. See this template's page for a new party.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Partyparty

The article name of the relevant party

Example
Labour Party (UK)
Page namerequired
Candidate namecandidate

no description

Stringrequired
Number of votesvotes

no description

Example
9,999
Numberrequired
% vote sharepercentage

no description

Example
50.0
Numberrequired
Vote share changechange

Number of percentage points more/less than the previous election.

Example
+10.0
Stringrequired

Party set up

It is necessary to do some a little bit of setup for each party in the election. This involves creating an entry in Module:Political party. See the documentation for Module:Political party for details.

Microformat

Template:UF-hcard-person

See also

Election box begin

Election box candidate

Standard

Winning

Inline


Election summary

For parties without an article on Wikipedia.


Election box gain/hold/loss etc

Election box majority

Election box turnout

Election box total and related

Election box end