Template:Template Parameter

From UO Eventine Wiki
Jump to navigation Jump to search

Template:Template Parameter is designed for use on template pages to explain a parameter's function and usage. {{#if: | {{{othernotes}}} | }}

Template

{{#switch:  {{Template Parameter
|name=
|usage=
|takes=
|denotes=
|generates=
|defaultvalue=
|anonymous=
|othernotes=
|validvalues=
}}  |  {{Template Parameter
|name=
|usage=
|takes=
|denotes=
|generates=
|defaultvalue=
|anonymous=
|othernotes=
|validvalues=
}}  }}

{{#if: | {{#ifeq: {{{display}}} | yes

 | ==Display==

{{{name}}}

  • Usage: {{#ifeq: | mandatory | Mandatory | Optional}}
  • Description: The {{{name}}} parameter takes {{{takes}}} denoting {{{denotes}}}. This is used to generate {{{generates}}}. {{#if: | If this parameter is left blank or omitted, a default value of "{{{defaultvalue}}}" is used. | }} {{#if: | {{#ifeq: {{{anonymous}}} | true | This parameter, the template's only one, is an anonymous parameter, which means that no parameter name needs to be explicitly specified when using Template:Template Parameter. }} }} {{#if: | {{{othernotes}}} }}
  • Valid Value(s): {{{validvalues}}}
 | ==Display==

{{{display}}}

 }}

}}

Parameters

{{#switch: {{{parameters}}} | none = This template has no parameters. | | #default = }} {{#fornumargs: key | value | [[Category:{{#var: value}}|Template Parameter]] }}

name

  • Usage: {{#ifeq: mandatory | mandatory | Mandatory | Optional}}
  • Description: The name parameter takes a string denoting the name of the parameter. This is used to generate the parameter's section header, as well as to display the parameter's name in the description. {{#if: | If this parameter is left blank or omitted, a default value of "{{{defaultvalue}}}" is used. | }} {{#if: | {{#ifeq: {{{anonymous}}} | true | This parameter, the template's only one, is an anonymous parameter, which means that no parameter name needs to be explicitly specified when using Template:Template Parameter. }} }} {{#if: | {{{othernotes}}} }}
  • Valid Value(s): Any string.

usage

  • Usage: {{#ifeq: | mandatory | Mandatory | Optional}}
  • Description: The usage parameter takes a string denoting whether the use of the parameter is mandatory or optional. This is used to generate the "Usage" bullet point. {{#if: Optional | If this parameter is left blank or omitted, a default value of "Optional" is used. | }} {{#if: | {{#ifeq: {{{anonymous}}} | true | This parameter, the template's only one, is an anonymous parameter, which means that no parameter name needs to be explicitly specified when using Template:Template Parameter. }} }} {{#if: The value of "Optional" will also be displayed if a value is supplied that is not "mandatory." | The value of "Optional" will also be displayed if a value is supplied that is not "mandatory." }}
  • Valid Value(s): "mandatory"

takes

  • Usage: {{#ifeq: mandatory | mandatory | Mandatory | Optional}}
  • Description: The takes parameter takes a string or strings denoting what type of values the parameter takes in. This is used to generate the middle of the first sentence in the parameter's "Description" bullet point. {{#if: | If this parameter is left blank or omitted, a default value of "{{{defaultvalue}}}" is used. | }} {{#if: | {{#ifeq: {{{anonymous}}} | true | This parameter, the template's only one, is an anonymous parameter, which means that no parameter name needs to be explicitly specified when using Template:Template Parameter. }} }} {{#if: | {{{othernotes}}} }}
  • Valid Value(s): Any string or strings.

denotes

  • Usage: {{#ifeq: mandatory | mandatory | Mandatory | Optional}}
  • Description: The denotes parameter takes a string or strings denoting what the value passed to the parameter corresponds to. This is used to generate the end of the first sentence in the parameter's "Description" bullet point. {{#if: | If this parameter is left blank or omitted, a default value of "{{{defaultvalue}}}" is used. | }} {{#if: | {{#ifeq: {{{anonymous}}} | true | This parameter, the template's only one, is an anonymous parameter, which means that no parameter name needs to be explicitly specified when using Template:Template Parameter. }} }} {{#if: | {{{othernotes}}} }}
  • Valid Value(s): Any string or strings.

generates

  • Usage: {{#ifeq: mandatory | mandatory | Mandatory | Optional}}
  • Description: The generates parameter takes a string or strings denoting what the parameter's data is used for. This is used to generate the second sentence in the parameter's "Description" bullet point. {{#if: | If this parameter is left blank or omitted, a default value of "{{{defaultvalue}}}" is used. | }} {{#if: | {{#ifeq: {{{anonymous}}} | true | This parameter, the template's only one, is an anonymous parameter, which means that no parameter name needs to be explicitly specified when using Template:Template Parameter. }} }} {{#if: | {{{othernotes}}} }}
  • Valid Value(s): Any string or strings.

defaultvalue

  • Usage: {{#ifeq: | mandatory | Mandatory | Optional}}
  • Description: The defaultvalue parameter takes a string or strings denoting what will be displayed if a parameter that has a default value is left blank or omitted. This is used to generate a sentence reading "If this parameter is left blank or omitted, a default value of defaultvalue is displayed." after the sentence generated by generates. {{#if: | If this parameter is left blank or omitted, a default value of "{{{defaultvalue}}}" is used. | }} {{#if: | {{#ifeq: {{{anonymous}}} | true | This parameter, the template's only one, is an anonymous parameter, which means that no parameter name needs to be explicitly specified when using Template:Template Parameter. }} }} {{#if: | {{{othernotes}}} }}
  • Valid Value(s): Any string or strings.

anonymous

  • Usage: {{#ifeq: | mandatory | Mandatory | Optional}}
  • Description: The anonymous parameter takes the value "true" denoting that the only parameter in the template is an anonymous numbered parameter. This is used to generate a sentence indicating this fact. {{#if: | If this parameter is left blank or omitted, a default value of "{{{defaultvalue}}}" is used. | }} {{#if: | {{#ifeq: {{{anonymous}}} | true | This parameter, the template's only one, is an anonymous parameter, which means that no parameter name needs to be explicitly specified when using Template:Template Parameter. }} }} {{#if: | {{{othernotes}}} }}
  • Valid Value(s): "true"

othernotes

  • Usage: {{#ifeq: | mandatory | Mandatory | Optional}}
  • Description: The othernotes parameter takes a string or strings denoting any other relevant information about the parameter. This is used to generate a sentence or sentences at the end of the "Description" bullet point. {{#if: | If this parameter is left blank or omitted, a default value of "{{{defaultvalue}}}" is used. | }} {{#if: | {{#ifeq: {{{anonymous}}} | true | This parameter, the template's only one, is an anonymous parameter, which means that no parameter name needs to be explicitly specified when using Template:Template Parameter. }} }} {{#if: | {{{othernotes}}} }}
  • Valid Value(s): Any string or strings.

validvalues

  • Usage: {{#ifeq: mandatory | mandatory | Mandatory | Optional}}
  • Description: The validvalues parameter takes a string or strings denoting any and all values that are valid to be passed to the parameter. This is used to generate the "Valid Value(s)" bullet point. {{#if: | If this parameter is left blank or omitted, a default value of "{{{defaultvalue}}}" is used. | }} {{#if: | {{#ifeq: {{{anonymous}}} | true | This parameter, the template's only one, is an anonymous parameter, which means that no parameter name needs to be explicitly specified when using Template:Template Parameter. }} }} {{#if: | {{{othernotes}}} }}
  • Valid Value(s): Any string or strings.