Tɛmplet:Checks for unknown parameters/doc
This is a documentation subpage for Tɛmplet:Checks for unknown parameters. It contains usage information, categories and other content that is not part of the original tɛmplet page. |
This template uses Lua: |
This template is for use in the documentation of templates which use Module:Check for unknown parameters.
It is recommended to place it somewhere after the documentation of known parameters, possibly under a heading == Unknown parameters ==
.
Usage
[mali mi di yibu sheena n-niŋ]{{Checks for unknown parameters}}
produces:
This template uses Module:Check for unknown parameters. All allowed parameters must be listed at {{#invoke:Check for unknown parameters|...}}
in the template's own code. A call with an unlisted parameter may cause a warning in previews and may add a tracking category.
There are two optional parameters preview
and category
.
|preview=yes
should be set if {{#invoke:check for unknown parameters|preview=...}}
in the template code sets preview
to anything.
|category=categoryname
should be set if
{{#invoke:Check for unknown parameters|unknown=...}}
has a category called categoryname in unknown
.
For example, Template:Infobox dog breed says:
{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox dog breed with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox dog breed]] with unknown parameter "_VALUE_"|...}}
{{Checks for unknown parameters|preview=yes|category=Pages using infobox dog breed with unknown parameters}}
produces:
This template uses Module:Check for unknown parameters. All allowed parameters must be listed at {{#invoke:Check for unknown parameters|...}}
in the template's own code. A call with an unlisted parameter causes a warning in previews and adds Category:Pages using infobox dog breed with unknown parameters (0).
The number in parentheses is the number of pages in the category (sometimes inaccurate due to MediaWiki limitations).
There are no options to specify that a preview warning is not set or a tracking category is not added since this could easily be temporary or wrong. The message is both intended for users and maintainers of the template.