This is the documentation page for Module:Params
This is a documentation subpage for Module:Params. It may contain usage information, categories and other content that is not part of the original module page. |
The {{#invoke:params}}
module is designed to be adopted by those templates that want to have a deep control of their parameters. It is particularly useful to variadic templates, to which it offers the possibility to count, list, map and propagate the parameters received without knowing their number in advance.
The module offers elegant shortcuts to non variadic templates as well. Outside templates it has virtually no applications; hence, if you plan to make experiments, make sure to do them from within a template, or you will not be able to see much (you can use {{Template sandbox}} for that). Under ../testcases you can find helper templates that can be specifically used for testing the module's capabilities in flexible ways. Finally, under ./examples you can find some of the examples shown in this documentation page.
Note: In case your template uses
{{#invoke:params}}
, please add {{lua
Please, do not edit this module without having done extensive testing in the module's sandbox first.
ATTENTION, as of 3/8
- This module is FUCKHUGE at the documentation level (read -- the imported page with its full usage examples) and is not fun to load (the module works perfectly fine -- the page itself is huge). I will eventually offset the documentation into separated chapters and load it page by page. No matter how useful it is to have a singular page it's obscenely unpleasant to tax the server CPU with the biggest call just because it's convenient to scroll. This isn't a good practice anyways (in my humble opinion).
Want to read?
See: The Module:Params/doc page on Wikipedia.
Subpages
- Module:Params/ChangeLog – Record of the most important changes in the module's code
- Module:Params/testcases – Testing the module's capabilities
- Module:Params/doc/examples – Some of the examples mentioned in this documentation
The complete list of subpages is available here.
Notes
See also
- {{#invoke:TemplatePar}}
- {{#invoke:ParameterCount}}
- {{#invoke:Separated entries|main}}
- {{#invoke:Enumerate|main}}
- {{#invoke:Check for unknown parameters|check}}
- {{#invoke:Check for deprecated parameters|check}}
- {{#invoke:Check for clobbered parameters|check}}
- {{#invoke:Parameter validation}}
- {{#invoke:Expand wikitext|main}}
- {{#invoke:For loop|main}} and {{For loop}}
- {{#invoke:For nowiki|template}} and {{For nowiki}}
- Project:TemplateData