User:KokoroSenshi/Sandbox/Help:Templates


 * See also: Help:Templates on MediaWiki

Templates are just that: templates that can be used on any page to standardize some element, by simply filling in the required information for that particular situation. There are many kinds of templates, each serving a different goal.

Essentially, a template is a separate page in the "Template". 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 where you've placed it - this is called transclusion. Note that the Wikitext typed remains as it was typed, while when reading the page it is replaced by the template content. For the Wikitext to change as well, substitution must be used. Many templates have s, or fields, that modify its appearance and content, so it can be customized to any situation.

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, by providing an organized set of links to other articles. They are typically placed at the bottom of pages. Navigation templates contain little or no s to modify.

Examples of navigation templates include or. s are useful for making navigation templates such as, by allowing the reader to click different places on an image to navigate to other pages.

Infoboxes

 * See all infobox templates

Infobox templates - typically placed near the top of pages, 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.

Notice Templates

 * See all notice templates

These templates inform users about present conditions or situations that a given article is currently in. They are placed at the top of pages. Most notice templates temporarily mark articles needing attention, calling for editors to fix them. For example, marks articles lacking sources,  marks articles proposed for merging, and so on. When such templates beneficial to editors are placed on a page, these templates automatically the page to so editors can find them. The templates are removed once the corresponding issues are addressed. Some notice templates have a date parameter to show how long an article has been flagged.

Some notice templates are placed permanently on pages. These are for the benefit of readers rather than editors. For example, is permanently placed on articles or sections that cover non-canon topics.

Formatting Templates

 * See all formatting templates

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

Formatting templates may contain extra parameters to modify it's appearance when customization is desired.

Inline Templates

 * See all inline templates

Inline templates display messages within an article's text, and are a type of notice template. They are essentially miniature notice templates: instead of marking entire articles, they mark specific sentences in articles. Like regular notice templates, an inline template identifies a problem with a sentence and is removed once an editor addresses the problem. ,, , , , and are examples of such templates. is a permanent inline template used to mark conjectural or fan-made names.

Making a Template
The easiest way is to type  { {your template name}} to the Sandbox, and click on the red link that appears after saving or previewing. At the resulting editing page, 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 directly after the end of your template text (not even leaving a space nor new line!) you add to begin any section detailing how to use the template, and also the add the necessary category for that template, and at the very end type to enclose the section and category. 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 at the bottom of 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 had saved the edit.

The template sandbox Template:Test (in the list of sandboxes at Zelda Wiki:Sandbox) can be used to test your templates.

ed templates can also be tested on pages using Special:TemplateSandbox. Please refer to MediaWiki for more information on this feature.

Alternatively, since one can not only Templates but ordinary pages (e.g.   will display the entire bombchu article content), then for example you can create your own template sandbox on , and type   into a sandbox to use it.

Examples
The following is a list of popular notice and inline templates. A list of formatting templates can be found here.

Categories
Many templates automatically pages when used. For example, an article tagged with will automatically be added to Category:Articles lacking sources.

Category Suppression
Templates with this feature will usually have an option to disable automatic categorization. This is known as. Category suppression is useful when using a template for something other than its intended purpose - for instance, a template gallery or list, such as the one above.

Some templates automatically suppress categories when used in the "User" namespace. This prevents these articles from appearing in categories intended for the only.