Template:Infobox election/doc: Difference between revisions
From Chalo Chatu, Zambia online encyclopedia
Jump to navigationJump to search
Chalochatu (talk | contribs) Created page with "{{Documentation subpage}} {{High-risk|reason=Heavily used across election articles; changes affect many pages.}} = Template:Infobox election = This template builds a flexible infobox for election pages (presidential, parliamentary/legislative, by-elections, primaries). It supports up to nine parties/candidates in three blocks (1–3, 4–6, 7–9), optional turnout and progress bars, and up to four maps with captions. == Basic usage == Minimal example (presidential): <..." |
Chalochatu (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
= | == Purpose == | ||
This template | This template is used to create a consistent and informative infobox for articles about elections in Zambia and beyond. It presents key facts such as the election date, type, country, turnout, main candidates, votes, percentages, and election maps. | ||
== | == Usage == | ||
Place this template at the top of any election article. Only include parameters that are known. Empty fields will be automatically hidden. | |||
== Example == | |||
<pre> | <pre> | ||
{{Infobox election | {{Infobox election | ||
| election_name = | | election_name = 2026 Zambian General Election | ||
| type = Presidential | |||
| type | | election_date = 12 August 2026 | ||
| election_date = | | country = Zambia | ||
| | | turnout = 65.3% | ||
| turnout | | registered = 7,300,000 | ||
| previous_link = 2021 Zambian general election | |||
| | | previous_year = 2021 | ||
| nominee1 | | next_link = 2031 Zambian general election | ||
| next_year = 2031 | |||
| party1 | | nominee1 = Hakainde Hichilema | ||
| popular_vote1 = | | party1 = UPND | ||
| percentage1 | | popular_vote1 = 3,000,000 | ||
| percentage1 = 51.2 | |||
| nominee2 = Edgar Lungu | |||
| nominee2 | | party2 = PF | ||
| popular_vote2 = 2,600,000 | |||
| party2 | | percentage2 = 44.3 | ||
| popular_vote2 = | | map_image = Zambia 2026 election map.png | ||
| percentage2 | |||
}} | }} | ||
</pre> | </pre> | ||
== Parameters == | |||
=== General Information === | |||
; election_name : Title of the election. | |||
; type : Type of election (e.g., Presidential, Parliamentary, By-election). | |||
; election_date : Date when the election took place. | |||
; country : Name of the country (default: Zambia). | |||
; turnout : Voter turnout percentage. | |||
; registered : Number of registered voters. | |||
; previous_link / previous_year : Page link and year of the previous election. | |||
; next_link / next_year : Page link and year of the next election. | |||
== | |||
; election_name | |||
: | |||
; | |||
: | |||
; election_date | |||
: | |||
; | |||
: | |||
: | |||
; | |||
: | |||
; | |||
: | |||
; | |||
: Page | |||
. | |||
=== Candidates === | |||
Supports up to three candidates. | |||
; nominee1 / nominee2 / nominee3 : Name of the candidate. | |||
; party1 / party2 / party3 : Political party of the nominee. | |||
; popular_vote1 / popular_vote2 / popular_vote3 : Total number of votes received. | |||
; percentage1 / percentage2 / percentage3 : Percentage of votes received. | |||
== | === Map === | ||
; map_image : Name of the map image file (without "File:"). | |||
; map_caption : (Optional) Description below the map. | |||
== | == Notes == | ||
* Only non-empty fields will appear in the o* |
Latest revision as of 10:51, 19 September 2025
This is a documentation subpage for Template:Infobox election.
It contains usage information, categories and other content that is not part of the original template page.
It contains usage information, categories and other content that is not part of the original template page.
Purpose
This template is used to create a consistent and informative infobox for articles about elections in Zambia and beyond. It presents key facts such as the election date, type, country, turnout, main candidates, votes, percentages, and election maps.
Usage
Place this template at the top of any election article. Only include parameters that are known. Empty fields will be automatically hidden.
Example
{{Infobox election | election_name = 2026 Zambian General Election | type = Presidential | election_date = 12 August 2026 | country = Zambia | turnout = 65.3% | registered = 7,300,000 | previous_link = 2021 Zambian general election | previous_year = 2021 | next_link = 2031 Zambian general election | next_year = 2031 | nominee1 = Hakainde Hichilema | party1 = UPND | popular_vote1 = 3,000,000 | percentage1 = 51.2 | nominee2 = Edgar Lungu | party2 = PF | popular_vote2 = 2,600,000 | percentage2 = 44.3 | map_image = Zambia 2026 election map.png }}
Parameters
General Information
- election_name
- Title of the election.
- type
- Type of election (e.g., Presidential, Parliamentary, By-election).
- election_date
- Date when the election took place.
- country
- Name of the country (default: Zambia).
- turnout
- Voter turnout percentage.
- registered
- Number of registered voters.
- previous_link / previous_year
- Page link and year of the previous election.
- next_link / next_year
- Page link and year of the next election.
Candidates
Supports up to three candidates.
- nominee1 / nominee2 / nominee3
- Name of the candidate.
- party1 / party2 / party3
- Political party of the nominee.
- popular_vote1 / popular_vote2 / popular_vote3
- Total number of votes received.
- percentage1 / percentage2 / percentage3
- Percentage of votes received.
Map
- map_image
- Name of the map image file (without "File:").
- map_caption
- (Optional) Description below the map.
Notes
- Only non-empty fields will appear in the o*