Writing:How to add election dates to county templates

From Ballotpedia
Jump to: navigation, search
Editing Help
1328101905 Help.png
Editing guide
Textual standards
Visual standards
Glossary of terms
Edit review process
See Add election dates to templates.


  • You will be making improvements to these templates:

  • You will be altering these templates so they look like the {{Colorado counties}} template.
  • Your overall goal is so that when the template is opened, the reader can see both the counties and the dates on which local ballot measure elections have occurred in that county.


Step 1

  • The template you want to improve has "v," "d" and "e" on it. Click on either "v" or "e." This takes you either to the page for the template, or its editing screen.

Step 2

  • Open up another tab on your screen. On this tab, open a template that has been improved. You can periodically look at the code on that screen to help you understand what you are about to read.

Step 3

  • On the unimproved template, beneath the lines that say:

|name = Rhode Island counties
|title = [[Local ballot measures, Rhode Island|Local ballot measures]] in [[Rhode Island]]


|titlestyle = background:#bbccee; 
|imagestyle = padding-left:0.5em; 
|groupstyle = background:#bbccee; 
|liststyle  = padding:0.25em 0; line-height:1.4em;

This means that your entire first section will look like this:

| name   = Colorado counties
| title  = [[Local ballot measures, Colorado|Local ballot measures]] in [[Colorado]]
|titlestyle = background:#bbccee;
|imagestyle = padding-left:0.5em;
|groupstyle = background:#bbccee;
|liststyle  = padding:0.25em 0; line-height:1.4em; 

Step 4

  • Then, insert a new line above the line that starts with "| list1 =" and insert:
| group1 = [[:Category:Colorado counties|Counties]] 
| list1  = 

All the links to your counties should then start on the next line as they do in {{Colorado counties}}.

Step 5

  • Then, insert a new, empty line (a space break) and type:
| group2 = [[:Category:Colorado election dates|2009 election dates]]
| list2  =


  • Substitute the name of the state you're working on for "Colorado" in the example above.
  • Make sure that the digit you're working with is "2."

Step 6

  • Preview your work. If it doesn't look right, compare it to the {{Colorado counties}} template, looking for very small differences. These templates are very finicky.
  • The section of the template you've created where dates go may be red-linked; don't worry about that as later on, dates will be added.
  • If there are no dates, this section of your template may not show up at all on the template, even though it is in the code. If it is in the code, again, don't worry, since a line for the dates will manifest once an actual date has been added. You can add a placeholder such as forthcoming if you wish.
  • Once the work has been done to your satisfaction, save the edits.

Step 7

Remove the template you have improved from this list and this list.