Mr. Johnson (talk | contribs) (Created page with "{{Documentation}} <includeonly><onlyinclude><span class="error"><strong>Error!</strong> {{#if:{{IsNum|{{{1}}}}}|{{Template|{{{2}}}}} has {{{1}}} mandatory parameters|{{Code|{{{1}}}}} is required by {{Template|{{{2}}}}}}}!</span></onlyinclude></includeonly>") |
Mr. Johnson (talk | contribs) No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Documentation}} | {{Documentation}} | ||
<includeonly><onlyinclude> | <includeonly><onlyinclude>{{Error|{{#if:{{IsNum|{{{1}}}}}|{{Template|{{{2}}}}} has {{{1}}} mandatory parameters|{{Code|{{{1}}}}} is required by {{Template|{{{2}}}}}}}}}</onlyinclude></includeonly> |
Latest revision as of 23:59, 3 December 2023
Template:Required
Template:Required
is a helper template for Template:Error
, used to call out missing mandatory parameters.
Usage
It accepts two mandatory parameter:
1
is the name of the parameter or the number of parameters.2
is 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!
foo
is required by Template:bar
!{{Required|7|bar}}
returns: Error!
Template:bar
has 7 mandatory parameters!The documentation above was transcluded from Template:Required/Documentation. [ edit ]