FANDOM


Template for standardized formatting of template parameters in template documentation.

Usage

{{Docparam|name=parameter|req=yes|desc=description}}

Parameters

{{#vardefine:icon-highuse|}}{{#vardefine:icon-link|}}{{#vardefine:icon-image|Icon question.png}}{{#vardefine:icon-tooltip|Unrecognized icon name}}{{#vardefine:icon-size-word|normal}}{{#vardefine:icon-size|}}{{#vardefine:icon-image|Icon required.png}}{{#vardefine:icon-tooltip|Required}}{{#var:icon-tooltip}}[[{{#var:icon-link}}|​]]
<unnamed 1> or name

Name of the parameter(s). Certain strings are automatically translated to allow for specification of alternative choices or parameter ranges.

Translated strings (all of these need to be enclosed by spaces):

  • >> is converted to a dash with spaces around it (" - "); used to indicate parameter ranges (e.g. "game1 - game5").
  • // is converted to " or "; used for alternative choices (e.g. "<unnamed 1> or title").
  • ++ is converted to a comma with a trailing space (", "); used for listing parameters which are separate but work the same (e.g. "contentA1, contentB1").
{{#vardefine:icon-highuse|}}{{#vardefine:icon-link|}}{{#vardefine:icon-image|Icon question.png}}{{#vardefine:icon-tooltip|Unrecognized icon name}}{{#vardefine:icon-size-word|normal}}{{#vardefine:icon-size|}}{{#vardefine:icon-image|Icon optional.png}}{{#vardefine:icon-tooltip|Optional}}{{#var:icon-tooltip}}[[{{#var:icon-link}}|​]]
default, default2

The default value(s) of the parameter.

{{#vardefine:icon-highuse|}}{{#vardefine:icon-link|}}{{#vardefine:icon-image|Icon question.png}}{{#vardefine:icon-tooltip|Unrecognized icon name}}{{#vardefine:icon-size-word|normal}}{{#vardefine:icon-size|}}{{#vardefine:icon-image|Icon required.png}}{{#vardefine:icon-tooltip|Required}}{{#var:icon-tooltip}}[[{{#var:icon-link}}|​]]
desc

Description of the parameter.

{{#vardefine:icon-highuse|}}{{#vardefine:icon-link|}}{{#vardefine:icon-image|Icon question.png}}{{#vardefine:icon-tooltip|Unrecognized icon name}}{{#vardefine:icon-size-word|normal}}{{#vardefine:icon-size|}}{{#vardefine:icon-image|Icon semi-required.png}}{{#vardefine:icon-tooltip|Sometimes required or at least one required}}{{#var:icon-tooltip}}[[{{#var:icon-link}}|​]]
(default: "yes")
req

Specifies whether this parameter is required for the template to function.

Available options:

  • no: Completely optional.
  • semi: Parameter is required in certain circumstances but optional in others. For a range of parameters (set via up to, this means that at least one of them is required.
  • yes: Always required.

Copy/paste

{{Docparam|name=|req=|default=|desc=

}}

Examples

Simple

{{Docparam|name=parameter|req=yes|default=|desc=
Description
}}

results in:

{{#vardefine:icon-highuse|}}{{#vardefine:icon-link|}}{{#vardefine:icon-image|Icon question.png}}{{#vardefine:icon-tooltip|Unrecognized icon name}}{{#vardefine:icon-size-word|normal}}{{#vardefine:icon-size|}}{{#vardefine:icon-image|Icon required.png}}{{#vardefine:icon-tooltip|Required}}{{#var:icon-tooltip}}[[{{#var:icon-link}}|​]]
parameter

Description

Advanced

{{Docparam|name=parameter // alternative ++ similar1 >> similar3|req=no|default=default setting|desc=
Description
}}

results in:

{{#vardefine:icon-highuse|}}{{#vardefine:icon-link|}}{{#vardefine:icon-image|Icon question.png}}{{#vardefine:icon-tooltip|Unrecognized icon name}}{{#vardefine:icon-size-word|normal}}{{#vardefine:icon-size|}}{{#vardefine:icon-image|Icon optional.png}}{{#vardefine:icon-tooltip|Optional}}{{#var:icon-tooltip}}[[{{#var:icon-link}}|​]]
(default: "default setting")
parameter or alternative, similar1 up to similar3

Description

Community content is available under CC-BY-SA unless otherwise noted.