Pokémon Wiki

Don't like the ads? Then create an account! Users with accounts will only see ads on the Main Page and have more options than anonymous users.

READ MORE

Pokémon Wiki
No edit summary
(new style)
Line 1: Line 1:
  +
{{tocright}}
A '''template''' is a message, or importable page, that is located by itself somewhere on the Pok&eacute;mon Encyclopedia, that can be used on any other page; so, as in the text of the template; by adding the name of the template to the page you want the template's text on, syntaxed like <nowiki>{{templatename}}</nowiki>. This is useful for several reasons: whenever the template is changed on its external location, it also changes itself on all the pages it has been used on, making updating several pages that contain the same thing much easier (simular to SSI). It is also useful as a shortcut; instead of typing out a whole bunch of words, just type <nowiki>{{whatever}}</nowiki> and the text of the template ''whatever'' will appear on the page, when rendered (when editing, the template will always look like <nowiki>{{whatever}}</nowiki>).
 
  +
There are many '''templates''' in use in {{SITENAME}}; these are only a subset, representing some of the most important and commonly used ones. If you feel that a template belongs on this page, do not hesitate to add it.
  +
* [[:Category:Templates]] should cover all templates in the wiki, categorized into the various subcategories.
  +
* The Template namespace always has all templates in the wiki, sorted alphanumerically.
   
 
== What are templates? ==
To create a template, one would create a page called something like [[Template:templatename]] (the template must be in the template [[Pokemon:namespaces|namespace]]). The page they created would contain text that they would like to be on more than one page. Then, they would add <nowiki>{{templatename}}</nowiki> to the pages they wanted the text on, or whatever the actual page name was, excluding the namespace (in this case ''Template'', which it must always be).
 
  +
Wiki templates provide a means to insert the same content over and over in different (or the same) pages. This saves editors the hassle of duplicating the same text again and again, and also helps ensure consistency.
   
  +
Templates are generally shown with the format required to use the template (e.g. <code>{{t|stub}}</code>). Clicking the template name takes you to the template's page, where you can see what it looks like and how it is used.
To produce the text of a template, but not have it look like <nowiki>{{templatename}}</nowiki> when you edit the page, type <nowiki>{{subst:templatename}}</nowiki>. This way, the next time the page is edited, the content of the page using <nowiki>{{templatename}}</nowiki> is edited, you will see the content of the template, which you can edit (it only takes effect on that one page and it doesn't update when [[Template:templatename]] is changed.
 
   
  +
'''Detailed instructions on the usage of each template should exist on either the template page itself (inside "noinclude" tags) or the template's talk page.'''
==List of templates==
 
<table width="100%">
 
<tr>
 
<td width="25%" style="border:1px solid #000000;background-color:#aaaaaa;">Type this:</td>
 
<td width="50%" style="border:1px solid #000000;background-color:#fbfbfb;">To produce this:</td>
 
<td width="25%" style="border:1px solid #000000;background-color:#aaaaaa;">Notes:
 
</td>
 
</tr>
 
   
  +
== [[:Category:Article management templates|Article management templates]] ==
<tr>
 
  +
=== Nominate an article for deletion ===
<td width="25%" style="border:1px solid #000000;background-color:#f7f7f7;">[[Template:poke|<nowiki>{{poke}}</nowiki>]]</td>
 
  +
{{t|delete}}
<td width="50%" style="border:1px solid #000000;"><div id="articlefootnote" style="color:#aaa;font-size:x-small;">
 
  +
* Add this to an article to nominate it for deletion. It will add the article to [[:Category:Candidates for deletion]].
:''This article is related to [[Pokémon]].''
 
</div></td>
 
<td width="25%" style="border:1px solid #000000;background-color:#f7f7f7">Categorized at [[:Category:Pokemon]]
 
</td>
 
</tr>
 
   
  +
=== Disambiguation articles ===
  +
{{t|disambig}}
  +
* If you have several articles that have similar or identical names, you may wish to create a "disambiguation" page at the main article name, with the articles taking an extra phrase in brackets afterwards. For example:
  +
: '''[[The Prince]]''' <-- disambiguation page, with links to:
  +
:: [[The Prince (frog)]]
  +
:: [[The Prince (human)]]
  +
* For more information, see [[Wikipedia:Wikipedia:disambiguation|disambiguation on Wikipedia]].
  +
* Using {{t|disambig}} marks an article as a disambiguation page by adding a banner to the article and categorizing it under [[:Category:Disambiguations]]. Add links to the various articles under the banner.
   
  +
=== Stubs ===
<tr>
 
  +
{{t|stub}}
<td width="25%" style="border:1px solid #000000;background-color:#f7f7f7;">[[Template:pokedex|<nowiki>{{pokedex}}</nowiki>]]</td>
 
  +
* When a page has little or no useful information, then it is likely a stub. This template will include them in [[:Category:Article stubs]], and is used to list which articles need expanding.
<td width="50%" style="border:1px solid #000000;"><div id="articlefootnote" style="color:#aaa;font-size:x-small;">
 
:''This article is a [[Pokédex]] entry.''
 
</div></td>
 
<td width="25%" style="border:1px solid #000000;background-color:#f7f7f7">Categorized at [[:Category:Pokedex entries]]
 
</td>
 
</tr>
 
   
  +
== [[:Category:Category templates|Category templates]] ==
<tr>
 
  +
=== General category template ===
<td width="25%" style="border:1px solid #000000;background-color:#f7f7f7;">[[Template:wiki|<nowiki>{{wiki}}</nowiki>]]</td>
 
  +
{{t|category}}
<td width="50%" style="border:1px solid #000000;">{{wiki}}</td>
 
  +
* This can be added to categories to add general categorising details. Use in cases where it may be useful to point out to users how to categorise, such as popular categories.
<td width="25%" style="border:1px solid #000000;background-color:#f7f7f7">Categorized at [[:Category:The Pokemon Encyclopedia]]
 
</td>
 
</tr><tr>
 
<td width="25%" style="border:1px solid #000000;background-color:#f7f7f7;">[[Template:misc|<nowiki>{{misc}}</nowiki>]]</td>
 
<td width="50%" style="border:1px solid #000000;">{{misc}}</td>
 
<td width="25%" style="border:1px solid #000000;background-color:#f7f7f7">Categorized at [[:Category:Misc]]
 
</td>
 
</tr><tr>
 
<td width="25%" style="border:1px solid #000000;background-color:#f7f7f7;">[[Template:policy|<nowiki>{{policy}}</nowiki>]]</td>
 
<td width="50%" style="border:1px solid #000000;">{{policy}}</td>
 
<td width="25%" style="border:1px solid #000000;background-color:#f7f7f7">Categorized at [[:Category:Policy]]
 
</td>
 
</tr><tr>
 
<td width="25%" style="border:1px solid #000000;background-color:#f7f7f7;">[[Template:help|<nowiki>{{help}}</nowiki>]]</td>
 
<td width="50%" style="border:1px solid #000000;">{{help}}</td>
 
<td width="25%" style="border:1px solid #000000;background-color:#f7f7f7">Categorized at [[:Category:Help]]
 
</td>
 
</tr><tr>
 
<td width="25%" style="border:1px solid #000000;background-color:#f7f7f7;">[[Template:cleanup|<nowiki>{{cleanup}}</nowiki>]]</td>
 
<td width="50%" style="border:1px solid #000000;">{{cleanup}}</td>
 
<td width="25%" style="border:1px solid #000000;background-color:#f7f7f7">Categorized at [[:Category:Cleanup]]. See [[Pokemon:Cleanup|cleanup]].
 
</td>
 
</tr><tr>
 
<td width="25%" style="border:1px solid #000000;background-color:#f7f7f7;">[[Template:stub|<nowiki>{{stub}}</nowiki>]]</td>
 
<td width="50%" style="border:1px solid #000000;">{{stub}}</td>
 
<td width="25%" style="border:1px solid #000000;background-color:#f7f7f7">Categorized at [[:Category:Stubs]]. See [[Pokemon:Stubs|stubs]].
 
</td>
 
</tr><tr>
 
<td width="25%" style="border:1px solid #000000;background-color:#f7f7f7;">[[Template:stub|<nowiki>{{Section Stub}}</nowiki>]]</td>
 
<td width="50%" style="border:1px solid #000000;">{{Section Stub}}</td>
 
<td width="25%" style="border:1px solid #000000;background-color:#f7f7f7">Categorized at [[:Category:Stubs]]. See [[Pokemon:Stubs|stubs]].
 
</td>
 
</tr><tr>
 
<td width="25%" style="border:1px solid #000000;background-color:#f7f7f7;">[[Template:delete|<nowiki>{{delete}}</nowiki>]]</td>
 
<td width="50%" style="border:1px solid #000000;">{{delete}}</td>
 
<td width="25%" style="border:1px solid #000000;background-color:#f7f7f7">Categorized at [[:Category:Articles marked for speedy deletion]].
 
</td>
 
</tr><tr>
 
<td width="25%" style="border:1px solid #000000;background-color:#f7f7f7;">[[Template:ProposedDeletion|<nowiki>{{ProposedDeletion}}</nowiki>]]</td>
 
<td width="50%" style="border:1px solid #000000;">{{ProposedDeletion}}</td>
 
<td width="25%" style="border:1px solid #000000;backrgound-color:#f7f7f7">Categotized at [[:Category:Articles proposed for deletion]].
 
</td>
 
</tr><tr>
 
<td width="25%" style="border:1px solid #000000;background-color:#f7f7f7;">[[Template:other|<nowiki>{{other}}</nowiki>]]</td>
 
<td width="50%" style="border:1px solid #000000;">{{other}}</td>
 
<td width="25%" style="border:1px solid #000000;background-color:#f7f7f7">Categorized at [[:Category:Other uses]].
 
</td>
 
</tr>
 
   
  +
=== Template category template ===
  +
{{t|templatecategory}}
  +
* This should be added to any template-related categories, to list template-specific categorising details, which differ from those of normal pages.
   
  +
== [[:Category:General wiki templates|General wiki templates]] ==
{{help}}
 
  +
=== Clear ===
  +
{{t|clr}}, plus {{t|clrl}} and {{t|clrr}}
  +
* This template is used to reduce the amount of non-wikicode used on pages, replacing the code <code>&lt;br style="clear:both;" /&gt;</code>. Its use should generally be avoided.
  +
* You can use {{t|clr}} instead of the HTML tag that clears space below things like images, pictures and tables, so the following stuff doesn't begin until the bottom of the image, picture or table box.
  +
* You can also use {{t|clrl}} or {{t|clrr}} to clear only left or right floats.
  +
  +
=== For ===
  +
{{t|for|name|link}}
  +
* Use at the top of articles as a simple "for x see y" template.
  +
  +
=== Main article ===
  +
{{t|main|main article}}
  +
* Use at the start of a section to link to the main article on it.
  +
  +
=== Right-aligned Table of Contents ===
  +
{{t|tocright}}
  +
* This template floats the table of contents (toc) on the right. It should only be used when absolutely necessary, to keep consistent design.
  +
  +
=== Sandbox ===
  +
{{t|sandbox}}
  +
* A template that should be used to head up all [[Project:Sandbox]] pages.
  +
  +
=== T is for template ===
  +
{{t|t|template}}
  +
* This template allows you to show example template code (with a link to the templates) without using the template itself. It is used extensively on this page.
  +
  +
=== Welcome ===
  +
{{t|welcIP}} ''and'' {{t|welcome}}
  +
*The first (with longer version "welcomeIP" for those of you who like typing more) is to welcome new non-vandalistic contributors who are "anonymous", identified only by their IP number; it encourages them to register.
  +
* The second template is for welcoming new registered users. Should be customized for the wiki, indicating the pages we most want newcomers to visit.
  +
*The above two templates are very suitable for having "subst:" prefixed, because they can be edited with additions or deletions appropriate to the apparent strengths of the person being welcomed; e.g. if the contributor has already demonstrated good wiki editing skills you could delete references to pages about "how to edit".
  +
  +
=== Wikipedia ===
  +
{{t|wikipedia}}, {{t|wikipedia-deleted}}
  +
* Wikipedia-related templates. Use {{t|wikipedia}} for articles taken directly from Wikipedia, and {{t|wikipedia-deleted}} for articles deleted from Wikipedia.
  +
  +
[[Category:Pokémon Wiki|{{PAGENAME}}]]
  +
[[Category:Templates| ]]

Revision as of 01:21, 25 April 2009

There are many templates in use in Pokémon Wiki; these are only a subset, representing some of the most important and commonly used ones. If you feel that a template belongs on this page, do not hesitate to add it.

  • Category:Templates should cover all templates in the wiki, categorized into the various subcategories.
  • The Template namespace always has all templates in the wiki, sorted alphanumerically.

What are templates?

Wiki templates provide a means to insert the same content over and over in different (or the same) pages. This saves editors the hassle of duplicating the same text again and again, and also helps ensure consistency.

Templates are generally shown with the format required to use the template (e.g. {{stub}}). Clicking the template name takes you to the template's page, where you can see what it looks like and how it is used.

Detailed instructions on the usage of each template should exist on either the template page itself (inside "noinclude" tags) or the template's talk page.

Article management templates

Nominate an article for deletion

{{delete}}

Disambiguation articles

{{disambig}}

  • If you have several articles that have similar or identical names, you may wish to create a "disambiguation" page at the main article name, with the articles taking an extra phrase in brackets afterwards. For example:
The Prince <-- disambiguation page, with links to:
The Prince (frog)
The Prince (human)
  • For more information, see disambiguation on Wikipedia.
  • Using {{disambig}} marks an article as a disambiguation page by adding a banner to the article and categorizing it under Category:Disambiguations. Add links to the various articles under the banner.

Stubs

{{stub}}

  • When a page has little or no useful information, then it is likely a stub. This template will include them in Category:Article stubs, and is used to list which articles need expanding.

Category templates

General category template

{{category}}

  • This can be added to categories to add general categorising details. Use in cases where it may be useful to point out to users how to categorise, such as popular categories.

Template category template

{{templatecategory}}

  • This should be added to any template-related categories, to list template-specific categorising details, which differ from those of normal pages.

General wiki templates

Clear

{{clr}}, plus {{clrl}} and {{clrr}}

  • This template is used to reduce the amount of non-wikicode used on pages, replacing the code <br style="clear:both;" />. Its use should generally be avoided.
  • You can use {{clr}} instead of the HTML tag that clears space below things like images, pictures and tables, so the following stuff doesn't begin until the bottom of the image, picture or table box.
  • You can also use {{clrl}} or {{clrr}} to clear only left or right floats.

For

{{for|<name>|<link>}}

  • Use at the top of articles as a simple "for x see y" template.

Main article

{{main|<main article>}}

  • Use at the start of a section to link to the main article on it.

Right-aligned Table of Contents

{{tocright}}

  • This template floats the table of contents (toc) on the right. It should only be used when absolutely necessary, to keep consistent design.

Sandbox

{{sandbox}}

  • A template that should be used to head up all Project:Sandbox pages.

T is for template

{{t|<template>}}

  • This template allows you to show example template code (with a link to the templates) without using the template itself. It is used extensively on this page.

Welcome

{{welcIP}} and {{welcome}}

  • The first (with longer version "welcomeIP" for those of you who like typing more) is to welcome new non-vandalistic contributors who are "anonymous", identified only by their IP number; it encourages them to register.
  • The second template is for welcoming new registered users. Should be customized for the wiki, indicating the pages we most want newcomers to visit.
  • The above two templates are very suitable for having "subst:" prefixed, because they can be edited with additions or deletions appropriate to the apparent strengths of the person being welcomed; e.g. if the contributor has already demonstrated good wiki editing skills you could delete references to pages about "how to edit".

Wikipedia

{{wikipedia}}, {{wikipedia-deleted}}

  • Wikipedia-related templates. Use {{wikipedia}} for articles taken directly from Wikipedia, and {{wikipedia-deleted}} for articles deleted from Wikipedia.