No edit summary Tag: Reverted |
No edit summary Tag: Manual revert |
||
| Line 1: | Line 1: | ||
<includeonly>[[Category:Categorization Template]]</includeonly> | <includeonly>[[Category:Categorization Template]][[Category:Error Template]]</includeonly> | ||
{{Template|Required}} is a helper template for {{Template|Error}}, used to call out missing mandatory parameters. | {{Template|Required}} is a helper template for {{Template|Error}}, used to call out missing mandatory parameters. | ||
==Usage== | ==Usage== | ||
Revision as of 18:34, 24 October 2022
Template:Required is a helper template for Template:Error, used to call out missing mandatory parameters.
Usage
It accepts two mandatory string parameter:
1is the name of the parameter or the number of parameters.2is the name of the template.
It should generally be included as the default for named parameters. For example, if a template called "bar" has a required parameter called "foo", it should be used like so: {{{foo|{{Required|foo|bar}}}}}
Return
{{Required|foo|bar}} returns:
Error!
foo is required by Template:bar!{{Required|7|bar}} returns:
Error!
Template:bar has 7 mandatory parameters!