Template:Election box/doc

These election box templates are for displaying a list of candidates and results for any election. They produce tables like this:

Basic
There are three basic templates:


 * Election box begin
 * Election box candidate
 * Election box end

The begin and end templates start and end a table with appropriate columns and formatting. The candidate template is used once for each candidate and contributes a row to the table.

When using this template please use the election box end template rather than simply inserting |} at the end of the election box. If you do place the |} it will be detected as an error by syntax-checking bots and will then be placed in the syntax cleanup project queue and will need to be fixed by someone. Having fixed a few hundred already, it is becoming somewhat repetitive.

For example:

Will create this:

Party links
See Template:Election box candidate with party link for usage and set-up.

Majority and turnout
Three further templates:


 * Election box majority
 * Election box turnout
 * Election box registered electors

can be added to record the majority, turnout and number of registered electors for an election. (In this context, "majority" refers to the winning margin between the first and second placed candidates.)

For example: ...

Will create this:

Election outcome
Finally there are two templates:


 * Election box hold with party link
 * Election box gain with party link

that can be used to summarize the outcome of an election, in terms of whether the incumbent holds the seat or whether it is lost to another party.

For example: ...

or...

Will create this:

or this...

Notes:
 * The swing parameter represents Peter Snow's Swingometer measure, i.e. the percentage change (or swing) in the vote since the last election.
 * When preparing the tables in advance of an election, it may be convenient to include these two templates but commented out (using ) until the outcome is known.
 * Potentially there is a need for versions of these templates that do not have the party link mechanism. However, it can be argued that any party that has a successful candidate deserves an article about them and the full /meta/color treatment.  The one obvious exception to this is, of course, independent candidates, who won't actually have a party.  If / when there's a need, just create a non party link version of these templates.

Blanks by country

 * United Kingdom
 * United States

Extensions

 * Template:Election FPTP begin As 1, but includes an additional column for expenditures. Example
 * Template:Election box begin for list As 1, but better suited to list-based multi-member constituencies. Example
 * Template:Election box candidate for alliance As 3, with an additional "side" party. Example