Template:Documentation/doc
- This is the documentation subpage of Template:Documentation. It contains usage information that is not part of the underlying template page.
{{documentation}}
This template displays a doc box like you are seeing now, and automatically loads the content from a /doc subpage. This template is intended for documenting templates and other pages that are transcluded onto other pages.
Use of this template allows templates to be protected where necessary, while allowing anyone to edit the documentation and categories.
Usage
This template is used without any parameters, placed at the bottom of the template or page being documented, within a <noinclude>...</noinclude> container:
<!--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.
Best practice
The code should be added at the bottom of the template code, with no space before <noinclude> (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 <includeonly>...</includeonly> tags.
If the documentation page contains <includeonly> or <noinclude> tags as part of the visible documentation text, replace the "<" with "<".
Automatic functions
If the documentation page does not exist, the [create] link includes a preload page so that clicking it will pre-fill the edit form with the basic documentation page format. The preload page for the /doc [create] link is Template:Documentation/preload.
See also
- The documentation template on Wikipedia; this wiki's documentation template is a greatly simplified version of Wikipedia's