Anonymous
×
Create a new article
Write your page title here:
We currently have 205 articles on Shadowrun Seattle Shutdown. Type your article name above or click on one of the titles below and start writing!



Shadowrun Seattle Shutdown

Template:Required/Documentation: Difference between revisions

No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>[[Category:Error 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==
It accepts two {{Parameter|mandatory|string}}:
It accepts two {{Parameter|mandatory}}:
* {{Code|1}} is the name of the parameter or the number of parameters.
* {{Code|1}} is the name of the parameter or the number of parameters.
* {{Code|2}} is the name of the template.
* {{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>}}
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: {{Code|<nowiki>{{{foo|{{Required|foo|bar}}}}}</nowiki>}}
==Return==
==Return==
{{Code|<nowiki>{{Required|foo|bar}}</nowiki>}} returns: {{Return|{{Required|foo|bar}}}}
{{Code|<nowiki>{{Required|foo|bar}}</nowiki>}} returns: {{Return|{{Required|foo|bar}}}}
{{Code|<nowiki>{{Required|7|bar}}</nowiki>}} returns: {{Return|{{Required|7|bar}}}}
{{Code|<nowiki>{{Required|7|bar}}</nowiki>}} returns: {{Return|{{Required|7|bar}}}}

Latest revision as of 10:34, 27 January 2023

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!