Anonymous
×
Create a new article
Write your page title here:
We currently have 55 articles on SR5 Foundry VTT System Wiki. Type your article name above or click on one of the titles below and start writing!



SR5 Foundry VTT System Wiki

Template:Required/Documentation

Revision as of 19:33, 19 November 2023 by Mr. Johnson (talk | contribs) (Created page with "<includeonly>Category:Categorization TemplateCategory: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}}: * {{Code|1}} is the name of the parameter or the number of parameters. * {{Code|2}} is the name of the template. It should generally be included as the default return for parameters. For example, if a template called "ba...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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!