Chronicles of Elyria Wiki:Template guidelines

These guidelines describes clean, descriptive usage for templates in Chronicles of Elyria Wiki. The usage described here is a guideline and can be overridden where circumstances warrant it. These guidelines will never be unerringly perfect for every situation. However, please try your best to keep to the advice outlined in this article so others may use your edits as an example when creating and editing their own templates.

Categorization
There are quite a few categories for templates. Categorize templates in the category with the narrowest definition.

Documentation
Templates should be constructed and documented in International English (that is, English without use of words which have different meanings in certain cultures). Document your template using the documentation template.

All parameters of the template which are not standard should be documented.

Generalization
Single templates which can perform multiple similar functions are preferred to multiple similar templates which perform one function. In any given template, accept as many variations on a parameter as possible; e.g., make your parameter values case insensitive.

Named parameters should be used as much as possible; avoid numbered parameters except as a default for when values for the named parameters are not supplied to the template. This aids others in using the template.

HTML syntax
Use XHTML 1.0 Transitional syntax in templates (and everywhere else on the wiki). Avoid use of the HTML id parameter in templates as templates can be used more than once on a page.

Ifexist
The parser function should be used as infrequently as possible.

Looping
Looping is very difficult to accomplish in MediaWiki templates without extensions (which Chronicles of Elyria Wiki does not have). Templates should refrain from doing so whenever possible, and let the user repeat the template as needed.

Standard parameters
These should be used as standard names and usages for parameters which are commons used in templates.
 * For templates which auto-categorize pages, use the following syntax to avoid categorization of the template itself or any pages that document the template:
 * This will allow users of the template to specify the doc parameter as blank and thus avoid categorization.
 * This will allow users of the template to specify the doc parameter as blank and thus avoid categorization.
 * This will allow users of the template to specify the doc parameter as blank and thus avoid categorization.