Difference between revisions of "Template:Election results box"

From Ballotpedia
Jump to: navigation, search
Line 22: Line 22:
  
 
;Example
 
;Example
:<code><nowiki>{{Election results box|D| # | # }}</nowiki></code>
+
:<code><nowiki>{{Election results box|D| # | # | # |}}</nowiki></code>
:<code><nowiki>{{Election results box|R| # | # }}</nowiki></code>
+
:<code><nowiki>{{Election results box|R| # | # | # |}}</nowiki></code>
:<code><nowiki>{{Election results box|I| # | # }}</nowiki></code>
+
:<code><nowiki>{{Election results box|I| # | # | # |}}</nowiki></code>
:<code><nowiki>{{Election results box|AI| # | # }}</nowiki></code>
+
:<code><nowiki>{{Election results box|AI| # | # | # |}}</nowiki></code>
:<code><nowiki>{{Election results box|C| # | # }}</nowiki></code>
+
:<code><nowiki>{{Election results box|C| # | # | # |}}</nowiki></code>
:<code><nowiki>{{Election results box|G| # | # }}</nowiki></code>
+
:<code><nowiki>{{Election results box|G| # | # | # |}}</nowiki></code>
:<code><nowiki>{{Election results box|L| # | # }}</nowiki></code>
+
:<code><nowiki>{{Election results box|L| # | # | # |}}</nowiki></code>
:<code><nowiki>{{Election results box|PF| # | # }}</nowiki></code>
+
:<code><nowiki>{{Election results box|PF| # | # | # |}}</nowiki></code>
:<code><nowiki>{{Election results box|T| # | # }}</nowiki></code>
+
:<code><nowiki>{{Election results box|T| # | # | # |}}</nowiki></code>
:<code><nowiki>{{Election results box|VT| # | # }}</nowiki></code>
+
:<code><nowiki>{{Election results box|VT| # | # | # |}}</nowiki></code>
:<code><nowiki>{{Election results box|RF| # | # }}</nowiki></code>
+
:<code><nowiki>{{Election results box|RF| # | # | # |}}</nowiki></code>
:<code><nowiki>{{Election results box|Very Silly Party| # | # }}</nowiki></code>
+
:<code><nowiki>{{Election results box|Very Silly Party| # | # | # |}}</nowiki></code>
 
:<code><nowiki>{{Election results box| | 0 | 0 }}</nowiki></code>
 
:<code><nowiki>{{Election results box| | 0 | 0 }}</nowiki></code>
  
 
;Output
 
;Output
 
{{Election results boxtop|width=%40|title=Very Silly Election}}
 
{{Election results boxtop|width=%40|title=Very Silly Election}}
{{Election results box|D| # | # }}
+
{{Election results box|D| # | # | # |}}
{{Election results box|R| # | # }}
+
{{Election results box|R| # | # | # |}}
{{Election results box|I| # | # }}
+
{{Election results box|I| # | # | # |}}
{{Election results box|AI| # | # }}
+
{{Election results box|AI| # | # | # |}}
{{Election results box|C| # | # }}
+
{{Election results box|C| # | # | # |}}
{{Election results box|G| # | # }}
+
{{Election results box|G| # | # | # |}}
{{Election results box|L| # | # }}
+
{{Election results box|L| # | # | # |}}
{{Election results box|PF| # | # }}
+
{{Election results box|PF| # | # | # |}}
{{Election results box|T| # | # }}
+
{{Election results box|T| # | # | # |}}
{{Election results box|VT| # | # }}
+
{{Election results box|VT| # | # | # |}}
{{Election results box|RF| # | # }}
+
{{Election results box|RF| # | # | # |}}
{{Election results box|Very Silly Party| # | # }}
+
{{Election results box|Very Silly Party| # | # | # |}}
 
|}
 
|}
<!--{{Election results boxbottom|''#''|''#''}}-->
+
<!--{{Election results boxbottom|''#''|''#''|''#''|}}-->
  
 
;See also
 
;See also

Revision as of 13:45, 13 December 2013

Parameters
1/party = Party affiliation (default "Vacancy")
The following are accepted (so far), case-insensitive:
Colored dots are used by List of political parties in the United States to identify parties.
This template uses the colors in the colored boxes to identify parties. Some parties may have no assigned color.
NOTE: Parties supported taken from Category:Political parties plus additional ones based on info from List of United States state legislatures.
2/candidatename = Name of Candidate
3/percentage = Percentage of vote Candidate received
label = Optional label for different party name
winner = This field should be left blank for everyone except the highest vote getter who will receive the {{Approved}} Approveda template.
Example
{{Election results box|D| # | # | # |}}
{{Election results box|R| # | # | # |}}
{{Election results box|I| # | # | # |}}
{{Election results box|AI| # | # | # |}}
{{Election results box|C| # | # | # |}}
{{Election results box|G| # | # | # |}}
{{Election results box|L| # | # | # |}}
{{Election results box|PF| # | # | # |}}
{{Election results box|T| # | # | # |}}
{{Election results box|VT| # | # | # |}}
{{Election results box|RF| # | # | # |}}
{{Election results box|Very Silly Party| # | # | # |}}
{{Election results box| | 0 | 0 }}
Output
Very Silly Election
Party Candidate Vote Percentage
     Democratic Party {{{candidatename}}} {{{percentage}}}
     Republican Party {{{candidatename}}} {{{percentage}}}
     Independent {{{candidatename}}} {{{percentage}}}
     American Independent Party {{{candidatename}}} {{{percentage}}}
     Constitution Party {{{candidatename}}} {{{percentage}}}
     Green Party {{{candidatename}}} {{{percentage}}}
     Libertarian Party {{{candidatename}}} {{{percentage}}}
     Peace and Freedom Party {{{candidatename}}} {{{percentage}}}
     Tea Party {{{candidatename}}} {{{percentage}}}
     Vermont Progressive Party {{{candidatename}}} {{{percentage}}}
     Reform Party {{{candidatename}}} {{{percentage}}}
     Very Silly Party {{{candidatename}}} {{{percentage}}}
See also



Template
Random Election
Party Candidate Vote Percentage
     Vacancy {{{candidatename}}} {{{percentage}}}
Total Votes #