FANDOM


Template documentation[view · edit · purge · links]

Template:Documentation creates a documentation section for template pages. It assumes the existence of a "/doc" subpage for the template in question, then transcludes that information within the documentation frame on the template page itself. As such, this template should always be wrapped in noinclude tags, along with the template's category.

Usage

<noinclude>{{documentation}}</noinclude>

Parameters

Optional

<unnamed 1>
(default: "{{FULLPAGENAME}}" )

Use this parameter if the subpage to be transcluded within the documentation frame is different from the template in question (default).

Guideline

All documentation pages ("/doc" subpages) should use a consistent format. Begin with an introduction to the template, emboldening the template name (as in main namespace articles), and then explain what the template does and how it should be used. The template documentation is considered a binding guideline for how that template should be used, therefore it should reflect consensus.

Proceed with a "Usage" section, which provides a copyable version of that template with empty parameters (wrapped in pre tags). Special notes for how the template should be transcluded where it is used should also go here, as a bulleted list above the pre tags.

Next include a "Parameters" section, listing every available parameter, using the {{docparam}} template. Include its name, whether it is a required parameter, what the parameter will default to (if applicable), and a detailed description of what the parameter does, all available input options, and how the parameter should be used.

Other sections may then be included as needed. If the template injects categories into the page on which it is transcluded, list those in a "Categories" section. If the template has dependencies, such as auxiliary templates, or if it is the dependency of other templates (a meta template), list or explain those in a "See also" section.

If the usage of a certain template is complicated or requires very specific uses, a "Guideline" section may also be included (as in this documentation). As previously stated, guidelines and use notes on documentation pages are considered binding, and they override other external guidelines. Therefore, it is important that all template documentation is written in accordance with community consensus.
Community content is available under CC-BY-SA unless otherwise noted.