Help:Templates


 * See also: Help:Templates on MediaWiki

Templates are just that: templates that can be used on any page to standardize some element. There are many kinds of templates, each serving a different goal.

Essentially, a template is a separate page in the "Template" namespace. By including the name of that page enclosed in  { {two curly brackets}} and placing it on another page, the entire contents of that template page will be displayed on the page you've posted it on - this is called transclusion. Many templates have parameters, or fields, that modify its appearance and content.

Navigation Templates

 * See all navigation templates

Navigation templates are used to link together pages with related subjects, for the benefit of readers. As the name suggests, they facilitate navigation between these pages. They are typically placed at the bottom of the page. Navigation templates contain little or no parameters to modify.

Examples of navigation templates include or. Image maps are useful for making navigation templates such as.

Infobox Templates

 * See all infobox templates

Infobox templates - typically placed near the top of the page, beneath notice templates - provide a summary of the article's subject. Each infobox template will have several specific fields which cover topics relating to the subject. For example, has fields for the game's release date, the publisher, the ESRB rating, etc.

Formatting Templates

 * See all formatting templates

Formatting templates help standardize of formatting across the Wiki - they essentially mold what you've written to appear a certain way. An excellent example would be the template; it ensures that all in-game citations in references appear the same throughout the entire site. These templates also make formatting quicker and simpler - take the game shortcuts, for example.

Formatting templates may contain extra parameters to modify.

Making a Template
The easiest way is to add  { {your template name}} to the Sandbox, and click on the red link that appears. From there you can create your template, which is most easily done by copying and pasting the code from a similar template; then you can just modify it.

Make sure that at the end of the last line of the ACTUAL TEMPLATE you add to begin any section detailing how to use the template, and also the add the necessary category for that template. Do not finish the template, create a new line, and then add the tag.

Testing a Template
When editing a template, a "preview page with this template" option will appear on the edit form. In the "page title" box, enter the name of a page that currently uses the template and pressing the adjacent "show preview" button. This allows you to preview the template as it would appear on that page if you saved the edit.

Sandboxed templates can also be tested on pages using Special:TemplateSandbox.

Please refer to MediaWiki for more information on this feature.