From The Mana World
(first step, taking a break now and continuing later)
 
(finishing templates categories and some rather minor formatting and spelling changes)
Line 2: Line 2:
{{Template:Metadesc}}
{{Template:Metadesc}}
{{I18n}}
{{I18n}}
{{Status Under Construction|This page will shortly explain what templates are, how to use them, how to find them and how to categorize them.}}
{{Status Under Construction|This page will shortly explain what templates are, how to use them, how to find them and how to categorize them.
 
[[User:Cassy|Cassy]] ([[User talk:Cassy|talk]]) 12:46, 10 March 2015 (UTC)}}


== Description ==
== Description ==
Line 15: Line 17:


== Template categories ==
== Template categories ==
Our Wiki keeps [[categories]] short and simple. We only use a few categories. If you create a new template please always categorize it the same way.
Our wiki keeps [[categories]] short and simple so we only use a few ones.
* [[General templates]]
 
* [[Templates for player pages]]
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 [https://wiki.themanaworld.org/index.php?title=Special:ListUsers&group=sysop Wiki Administrator] or [https://wiki.themanaworld.org/index.php?title=Special:ListUsers&group=bureaucrat Bureaucrat].
* [[Templates for dev pages]]
 
* [[Templates for translators]]
{| class="wikitable"
* [[Template documentation]]
|-
! Template Category !! Usage
|-
| [[:Category:General Template|General Template]] || General templates for this wiki.
|-
| [[:Category:Content Template|Content Template]] || Templates used for pages about content that's already in game.
|-
| [[:Category:Development Template|Development Template]] || Templates used for development-relevant pages.
|-
| [[:Category:Translation Template|Translation Template]] || Templates with translations.
|-
| [[:Category:Template documentation|Template documentation]] || Documentation about how a certain template works.
|}




== Creating a template ==
== Creating a template ==
''follows''
''follows'' (note to self: Template documentation, categorizing template!)




Line 40: Line 54:
</dl>
</dl>


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|Translation Template]].
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]] [[:Category:Translation Template|Translation Template]].





Revision as of 12:46, 10 March 2015



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.

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.


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}}".


See also