ਫਰਮਾ:documentation
- The following documentation is located at ਫਰਮਾ:documentation/documentation. [edit]
- Useful links: subpage list • links • redirects • transclusions
This template automatically displays a documentation section like you are seeing now. The content of this section comes from a subpage named ਫਰਮਾ:cd; e.g. the documentation for Template:affix is located on the page named ਫਰਮਾ:cd. In order for this documentation to be displayed, templates must manually invoke {{documentation}} inside of a ਫਰਮਾ:cd section; see #Usage below. (However, {{documentation}} is automatically invoked on module and JavaScript pages. The mechanism implementing this is described in more detail in the documentation for Module:documentation, which implements the {{documentation}} template.)
Usage
template code
...ਫਰਮਾ:wt{{documentation}}ਫਰਮਾ:wt
or
ਫਰਮਾ:wttemplate code . . .ਫਰਮਾ:wt
{{documentation}}
The most common practice is to place the {{documentation}} template in ਫਰਮਾ:wt tags. Alternatively, the template code itself can be wrapped in ਫਰਮਾ:wt tags and the {{documentation}} template should be outside of those tags. Both of these methods ensure that the documentation is not transcluded onto other pages as part of the template.
In order to place the template itself in a category, or supply interwiki links, put those categories and interwiki links on the documentation page, inside ਫਰਮਾ:wt tags. If the documentation page contains ਫਰਮਾ:wt or ਫਰਮਾ:wt tags as part of the documentation, use {{wikitag}} or replace ਫਰਮਾ:cd with ਫਰਮਾ:cd.
Functions
If the documentation page doesn't exist, the "edit" link includes a preload parameter so that clicking it will pre-fill the edit form with a stub documentation page.
Rationale
Use of this template allows templates to be protected where necessary, while allowing anyone to edit the documentation, categories, and interwiki links. In addition, modules strictly require documentation pages as they cannot be categorized or documented any other way, so it makes sense to handle templates likewise.