Template:Checks for unknown parameters
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.
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
[edit]{{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 (186).
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.
See also
[edit]- {{#invoke:check for unknown parameters|check}}
- {{#invoke:params|function}}