Help:Using templates

From Ballotpedia
Jump to: navigation, search
Editing Help
1328101905 Help.png
Index
Editing guide
Cheatsheet
Policies
Copyright
Textual standards
Visual standards
Glossary of terms
Edit review process
Tool Box
Gnome-preferences-other.svg
Writing tips
LinksVideos
Images Templates
TablesCategories
FootnotesCheatsheet
CommunityPortals

A template is a page that can be inserted onto any number of other pages on Ballotpedia. A template has two parts:

  1. "template" refers to the page where a template has been built. This page always starts with the prefix: Template: followed by the name that has been chosen for the template.
Example: Template:Montana Constitution
  1. "template" refers to the small bit of code you can use to insert a template into any other page on the wiki. That small bit of code is always the words that appear after Template: on the page where the template exists.
Example: To insert the template named "Montana Constitution" onto any other page, you type {{Montana Constitution}} on the page where you want it to appear. An example of this template in use can be found here.

Terminology

There are several terms you may see used in relation to templates. The most common are:

  • HNT: HNT stands for horizontal navigational template. These types of templates are usually found at the bottom of a page in a bar spanning the width of the page.
  • VNT: VNT stands for vertical navigational template. These types of templates are usually found along the right margin of the page. They are used to provide links to related pages on the wiki.
  • Infobox: Infoboxes are a type of vertical template. Like VNTs, they are typically found at the top of a page on the right side. Infoboxes contain parameters, which make the information displayed unique to each page on which the infobox is placed.

On HNTs, you will often see V, D and E links on the lefthand side. These links stand for the following:

  • V (view): takes you to the actual template page, where you can view the current template.
  • D (discussion): takes you to the discussion (or talk) page of the template. Notes can be left on that page, and links to the relevant project or projects can be found there.
  • E (edit): takes you to the edit box of the template page, where you can make changes to the template.

Reasons to use templates

There are two main reasons that Ballotpedia contributors create and use templates:

1. Sometimes it is useful if the exact same information appears on a number of Ballotpedia pages. When this is the case, it is better to use a template that contains that information. Why? Because then when the information changes, it only needs to be changed on one page (the basic template page) and then it automatically is changed on all the pages where the template appears. For example:

{{Current Governor list}}

is a list of current governors in office. The template is displayed on a variety of pages about the state executive officials. If new officials take office or current officials step down from office, the Ballotpedia staff would only need to update the template page to reflect those additions. Then each page with the template would be automatically updated.
2. Templates can make it much, much easier for contributors and readers to navigate around easily on Ballotpedia in certain subsections of knowledge. Some template are referred to as "navigational boxes" for that reason-because they make it so easy to browse around in Ballotpedia in a clear, easy way without constantly having to use your "back" button. For example:

{{help}}

allows a reader to quickly find help pages that may assist in editing. For that reason, Ballotpedia places that template on all pages related to the Help WikiProject.

Basic instructions

To include a template that already exists into an article you're working on, type the template's name in double curly brackets. The brackets key on your keyboard looks like: "{" or "}".

Simply type the name of the template, surrounded by two sets of braces, as in this example:

{{Alabama}}

Typing that gives you this:


For simple templates, that's all there is to it.

Finding templates

Where do you find templates that might add value to the article you're working on? When a template is created, it should be added to the Category:Template. Browsing through that category may familiarize you with some templates you might not otherwise have bumped into as you get to know Ballotpedia.

Commonly used templates

State templates

Like {{Alabama}} above, all states (and the District of Columbia) have a horizontal navigational template on Ballotpedia. To access that template, simply type the state name in a set of curly brackets.

Talk page templates

Each page on Ballotpedia should also have a talk page template on the talk page. You can identify talk pages which have not yet been created, since the word "Talk" will appear in red text. For a list of talk page templates, by state or project, see Ballotpedia:Talk page identifiers.

Project templates

Each project has its own templates. There is a talk page template, which identifies the page as being part of a project, and sometimes a project badge as well.

For a page that falls within the Ballotpedia:WikiProject School Board Elections, the talk page template is {{sb}} and the project badge, which appears on a page, is {{sb badge}} .

Badges

Badges are unifying images that belong on all pages within a project. They normally appear in the upper right corner of a page, but sometimes are moved to the upper left corner to make room for an infobox. Ballotpedia's badge images can be accessed in this category.

See also