Template:Documentation/doc

Purpose
This is the documentation template. It is intended for documenting templates and other pages which are transcluded onto other pages. Using this template allows templates to be made read-only where necessary, while allowing anyone to edit the documentation and categories.

This template displays a coloured text box like you are seeing now, and automatically loads the content from a /doc subpage or other places. The idea and the usage of this template was adopted from Wikipedia. For most of the instructions about how and when to use this template, see Wikipedia's article on template documentation.

Usage
In most cases this template is used without any parameters, placed at the bottom of the template or page being documented, within  tags:

Then this template automatically loads the content from the /doc subpage of the template it is used on.

This template can also load the content from any other page. Like this:

Best practice
The documentation tag should be added at the bottom of the template code, with no space before  (which would cause extra space on pages where the template is used).

Categories that apply to the template itself should be added to the bottom of the /doc subpage, inside  tags.

The Categorization of the template its documentation and of the pages that use the template works as follows:
 * To place the template itself into a category, add the  code inside an  ...  section on the /doc subpage.
 * To place the /doc subpage into a category, add the  code inside a  ...  section on the /doc subpage.
 * To make the template place an article into a category (when the article includes the template), add the  code inside an  ...  section on the template page.

Note: This template is a much less complex version of the Wikipedia template. We support only the parameters described here. Some convenience and customization functions, as well as support for sandbox and testcases are not available here.