No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
{{Documentation}} | {{Documentation}} | ||
<includeonly><onlyinclude>{{# | <includeonly><onlyinclude>{{Error|{{#if:{{IsNum|{{{1}}}}}|{{Code|{{{1}}}}} is required by {{Template|{{{2}}}}}|{{Template|{{{2}}}}} has {{{1}}} mandatory parameters}}}}{{Categorize|Errors|with}}</onlyinclude></includeonly> | ||
Revision as of 16:14, 24 October 2022
Template:Required is a helper template for Template:Error, used to call out missing mandatory parameters.
Usage
It accepts two mandatory 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 return for 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!
Template:bar has foo mandatory parameters!{{Required|7|bar}} returns: Error!
7 is required by Template:bar!The documentation above was transcluded from Template:Required/Documentation. [edit]
