(Created page with "<includeonly>Category:Error Template</includeonly> {{Template|Required}} is a helper template for {{Template|Error}}, used to call out missing mandatory parameters. ==Usage== It accepts two {{Parameter|mandatory|string}}: * {{Code|1}} is the name of the parameter.") |
No edit summary |
||
| Line 4: | Line 4: | ||
It accepts two {{Parameter|mandatory|string}}: | It accepts two {{Parameter|mandatory|string}}: | ||
* {{Code|1}} is the name of the parameter. | * {{Code|1}} is the name of the parameter. | ||
* {{Code|2}} is 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: {{Code|<nowiki>{{{foo|{{Required|foo|bar}}}}}</nowiki>}} | |||
==Return== | |||
{{Code|<nowiki>{{Required|1|required}}</nowiki>}} returns: {{Return|{{Required|1|required}}}} | |||
Revision as of 15:46, 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.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|1|required}} returns:
Error!
Template:required has 1 mandatory parameters!