Bhamwiki:Templates

From Bhamwiki
Jump to: navigation, search

Bhamwiki has several types of templates available to standardize the look of articles. A template is a wiki page that is inserted into the content of another. This page will give a brief overview of templates and how to use them, but for detailed information, see Help: Template at Wikipedia.org.

Usage

Basic usage

To insert a template into a page, simply include the name of the template in double braces ({{ }}). For example:

{{Expand list}}

will insert the following text:

This list is incomplete and may never satisfy any subjective standard for completeness. You can help BhamWiki by expanding it.

Parameters

Most templates have parameters that can be used to customize the template's text for the page it is included on. These parameters come in two types: named and unnamed. Unnamed parameters are simply included in the double braces after the template name, separated by a pipe symbol (|). Multiple parameters are also separated by pipes. Note that the order of the parameters is important. For example:

{{Main|Jefferson County sewer construction scandal}}

will insert the following:

Named parameters work in a similar manner, except each parameter has an name that is used to specify it, then an equal sign (=), then the value to be used. So, unlike unnamed paramters, the order they appear in is not important. Example:

{{Locate coords inline | lat=33.320016 | lon=-86.778385 | zoom=15 | type=h}}

will insert the following:

map

Note that in both named and unnamed cases, spaces around the pipes (|) and equal signs (=) are usually optional, but can somtimes aid readability.

Tips

If a template is included in a page being edited and Preview is clicked, a list of the included templates can be found at the bottom of the preview page. Note that one template can include others, so there may be templates included in the list that aren't seen directly in the page source. Each template in the list is a hyperlink to the template page and most template pages include documentation for the template.

Common Bhamwiki templates

The following is a list of templates commonly used in Bhamwiki. They are divided up by category. The actual templates should all be found in Category:Bhamwiki templates and its subcategories (which are listed below). Note that not all templates are listed here, just those in common use.

Date templates

  • Decade box is used to display a decade's worth of year links, plus links to the previous and next decades. It is typically only used at the bottom of year pages.

Disambiguation templates

  • About is used when one or more pages have similar names and therefore provides link either to the other page or a disambiguation page listing several pages that might be confused with each other.
  • Disambig is used for the notice at the bottom of disambiguation pages.
  • Distinguish is used when two similar pages have dissimilar names.
  • Redirect is used when a common name redirects to a single page, but there's another page (typically a disambiguation page) that might instead provide the desired topic.

Infobox templates

Infoboxes typically appear floating on the right side of the article with basic information about the topic of the page.

Licensing templates

These are typically used when uploading images. See Bhamwiki:Licensing templates.

Mapping templates

Used for links to Google Maps with a specific location marked.

  • Locate floats a box to the right saying "Locate with Google Maps" using latitude and longitude to mark the location.
  • Locate address floats a box to the right saying "Locate with Google Maps" using an address to mark the location.
  • Locate address inline inserts text with a hyperlink to an address on Google Maps.
  • Locate coords inline inserts text with a hyperlink to a latitude and longitude location on Google Maps.
  • Locate street floats a box to the right saying "Locate with Google Maps" with a street marked.

Media templates

Used to categorize images by their type. See Bhamwiki:Media templates.

Navigation templates

These templates typically appear at the bottom of a page and provided an organized set of links to pages with a common topic. Pages that are linked to in the template should include the template.

Notification templates

These templates are typically used for boilerplate text at the start of a page or section.

  • Address locations displays a "to see locations by address, see page" message in street categories.
  • Alphabetical locations displays a "to see locations alphabetically, see category" message on street pages.
  • Expand list displays an "incomplete list" message.
  • Main is used when a section of one page summarizes information that is more fully fleshed out on its own page.

Reference templates

These templates are used for books or periodicals referenced by multiple pages and display the information in the format used in the References section. The template naming convention for books is the author's last name, hyphen, and year of publication. For example:

{{Summe-2001}}

produces:

Summe, Sheryl Spradling. (2001). Homewood: The Life of a City. Homewood, AL: Friends of the Homewood Public Library.

For periodicals, the templates simply print the name of the periodical with it linked to the appropriate page. Current templates are:

References available through templates are categorized here: Category:Bhamwiki references.

Sequence templates

These templates display a set of boxes at the bottom of the page to refer to other pages that are part of a sequence, either chronologically or physically. Unlike most other template, these must be used in conjunction with each other. Any set of boxes must begin with the Start box template and conclude with the End box template.

  • Address box displays a street address and what's to either side.
  • Succession box displays a title and the previous and next holders of that title.

Stub templates

  • Stub displays a notice for articles that need to be fleshed out.