Template:Documentation

From Bulbapedia, the community-driven Pokémon encyclopedia.
Revision as of 08:52, 19 November 2023 by Bfdifan2006 (talk | contribs) (add empty sort key to category)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search



Template documentation
Note: portions of the template sample may not be visible without values provided.
View or edit this documentation. (About template documentation)

This template is used on template pages to contain documentation, instructions and information about how the template should be used.

Templates are a powerful tool, and allow for the display of lots of information in a consistent and manageable way. However, they can be confusing to new users and even experienced users can have difficulty making sense of the more complex ones. Templates should therefore be accompanied by documentation to improve usability, and to encourage others to experiment with templates and use them to their maximum potential.

What to include

A template's documentation should include a brief summary of what the template is for, and where it is intended to be used. This should be followed by a breakdown of any parameters and what values they accept. Finally, there should be at least one example of the template in use.

Usage

To include {{Documentation}} on a template page, place it at the bottom of the template page, directly after the last line of code, between <noinclude>...</noinclude> tags:

~last line of your template code~<noinclude>
{{Documentation}}
</noinclude>

The documentation can then be added to the /doc subpage of the template. For example, this documentation for {{Documentation}} is located at Template:Documentation/doc.

Optionally, should the location of the appropriate documentation be located elsewhere, it can be added to the Documentation template as an optional parameter:

~last line of your template code~<noinclude>
{{Documentation|Help:Color templates}}
</noinclude>

For templates that are no longer used, you can add |old=yes to include the {{OldTemplate}} template as well:

~last line of your template code~<noinclude>
{{Documentation|old=yes}}
</noinclude>