PikminFanon:Template guidelines

These guidelines apply to all templates generally. Templates are special pages that are inserted into normal articles, normally with content that can change dynamically. The raw code of a template should not be copied except to make a similar template.

Documentation
Every template page needs documentation on the template. Make sure to wrap this in  tags. The following sections should exist, when applicable:

Info
This section explains what the template does and when it should be used.

Parameters
If the template has any parameters, this section should detail them using a table. The following is how the table should look like:


 * Parameter: the name of the parameter, or its number, in the case of parameters that are not named.
 * Mandatory: "Yes" or "No", depending on whether the template needs the parameter to work correctly or not.
 * Default: the parameter's default value, in the case that it is optional. Special content, like, should be displayed in italics.
 * Purpose: this column should only exist if there are unnamed parameters. All unnamed parameters can be given a name here.
 * Description: an explanation of the parameter.

When creating the parameter documentation, the following code can be copy-pasted and edited accordingly:

Skeleton
For templates that have parameters, a template skeleton section should be created. This is simply a snippet of MediaWiki markup surrounded by  tags, so that editors who want to add the template to articles can just copy-paste the snippet and replace the values with their own. Value placeholders should start with  and end with. Example of a template skeleton:

Examples
In cases of dynamic and complex templates, it may be better to have a section with examples, that shows some of the template's behavior when presented with different parameters. The examples should be displayed inside a table like so:


 * Code: a snippet of MediaWiki markup that calls the template.
 * Result: what the template looks like.

Be careful with calling the template itself to provide the result, in cases where the template has side effects, such as adding a category to any page that includes it.

Like before, the following code can be copy-pasted by editors to help create an example table: