From The Mana World
Revision as of 22:07, 10 March 2015 by Cassy (talk | contribs) (forgot nowiki tags for that part)



Construction-worker.png

This article is currently under construction.
This page will shortly explain what templates are, how to use them, how to find them and how to categorize them.

Cassy (talk) 12:46, 10 March 2015 (UTC)



Description

A template is a wiki page created to be included in other pages. Templates usually contain repetitive material that might need to show up on any number of articles or pages. They are commonly used for boilerplate messages, standard warnings or notices, infoboxes, navigational boxes, and similar purposes.


Usage

Existing templates can be used by adding them with {{Template name}}. For instance {{i18n}} which is the language selection template at the top of this page.

If you want to place a link to a template this works just like other wiki links. Remember to include "Template:". Using the language selection template as example again this would make [[Template:i18n]] -> Template:i18n.


Template categories

Our wiki keeps categories short and simple so we only use a few ones.

If you create a new template please always categorize it the same way and do not create a new one unless you discussed it with a Wiki Administrator or Bureaucrat.


Remember to always put the <noinclude></noinclude> tags around that category, otherwise all pages using the template will be categorized!

For example <noinclude>[[Category:General Template]]</noinclude> will categorize the template alone but would categorize all pages using the template as General Template if you forget the <noinclude></noinclude> tags.


Template Category Usage
General Template General templates for this wiki.
Content Template Templates used for pages about content that's already in game.
Development Template Templates used for development-relevant pages.
Translation Template Templates with translations.
Template documentation Documentation about how a certain template works.

See also:


Creating a template

follows (note to self: Template documentation, categorizing template!)


Translating templates

Most templates are translatable within the original template, meaning you can put translations in the source of them instead of creating a new translated template page. "#switch: {{NAMESPACE}}" allows to create a switch. Depending on which translation page you are at {{NAMESPACE}} will display the corresponding content. The source looks like this:

{{switch: {{NAMESPACE}} | De = German translation | Es = Spanish translation | Fr = French translation | Zh = Chinese translation | #default = Original English text }}

So when you are at the German (De) translation page using a template with this source, it will say "German translation". On the Spanish (Es) translation page it will say "Spanish translation" and so on. You might want to check other templates to understand better. See Category Translation Template.


However, not every template is translatable in this fashion. Those need new translated templates, just like translation pages. Please name them like this:

"Template:.Fr:Template name", for usage it's "{{.Fr:Template name}}".