Template:Documentation

We are still working on several areas of the Wiki. Thank you for your patience.

Jump to: navigation, search

Documentation

[view] [edit] [history] [purge] Documentation icon Template documentation

This is the {{documentation}} template.

This template displays a green doc box like you are seeing now, and automatically loads the content from a /doc subpage. It can also load the content from other places if instructed to.

This template is intended for documenting templates and other pages which are transcluded onto other pages. It can be used in template space.

Use of this template allows templates to be protected where necessary, while allowing anyone to edit the documentation and categories.

Usage

Normally this template is used without any parameters, placed at the bottom of the template or page being documented, within <noinclude>:

<!--Last line of your template code--><noinclude>

{{documentation}}
<!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! -->
</noinclude>

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:

<!--Last line of your template code--><noinclude>

{{documentation |Template:Other page/doc}}
</noinclude>

Note that when loading the documentation from another page than the local /doc page it becomes tricky to handle the categories.

The content can also be fed directly as text. Like this:

<!--Last line of your template code--><noinclude>

{{documentation |content=
Some documentation text.
}}
</noinclude>