Difference between revisions of "Template:Template Parameter"
m (I am breaking so many things.) |
m |
||
Line 19: | Line 19: | ||
==Parameters== | ==Parameters== | ||
− | + | {{Template:Parameter Explanation | |
+ | |name=name | ||
+ | |usage=mandatory | ||
+ | |takes=a string | ||
+ | |denotes=the name of the parameter | ||
+ | |generates=the parameter's section header, as well as to display the parameter's name in the description | ||
+ | |validvalues=Any string. | ||
+ | }} | ||
===name=== | ===name=== | ||
* '''Usage:''' Mandatory | * '''Usage:''' Mandatory | ||
Line 48: | Line 55: | ||
* '''Description:''' The <span style="font-family:monospace;">generates</span> 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. | * '''Description:''' The <span style="font-family:monospace;">generates</span> 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. | ||
* '''Valid Value(s):''' Any string or strings. | * '''Valid Value(s):''' Any string or strings. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
===defaultvalue=== | ===defaultvalue=== | ||
Line 59: | Line 61: | ||
* '''Valid Value(s):''' Any string or strings. | * '''Valid Value(s):''' Any string or strings. | ||
</noinclude><includeonly>==={{{name}}}=== | </noinclude><includeonly>==={{{name}}}=== | ||
− | * '''Usage:''' | + | * '''Usage:''' {{#ifeq: {{{usage|}}} | mandatory | Mandatory | Optional}} |
* '''Description:''' The <span style="font-family:monospace;">{{{name}}}</span> parameter takes {{{takes}}} denoting {{{denotes}}}. This is used to generate {{{generates}}}. {{#if: {{{defaultvalue|}}} | If this parameter is left blank or omitted, a default value of "{{{defaultvalue}}}" is displayed. | }} {{#if: {{{othernotes|}}} | {{{othernotes}}} | }} | * '''Description:''' The <span style="font-family:monospace;">{{{name}}}</span> parameter takes {{{takes}}} denoting {{{denotes}}}. This is used to generate {{{generates}}}. {{#if: {{{defaultvalue|}}} | If this parameter is left blank or omitted, a default value of "{{{defaultvalue}}}" is displayed. | }} {{#if: {{{othernotes|}}} | {{{othernotes}}} | }} | ||
* '''Valid Value(s):''' {{{validvalues}}}</includeonly> | * '''Valid Value(s):''' {{{validvalues}}}</includeonly> |
Revision as of 12:03, 2 October 2009
Template:Parameter Explanation is designed for use on template pages to explain each parameter's function and usage.
Full Template
{{Parameter Explanation |name= |usage= |takes= |denotes= |generates= |defaultvalue= |othernotes= |validvalues= }}
Parameters
Template:Parameter Explanation
name
- Usage: Mandatory
- 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.
- Valid Value(s): Any string.
usage
- Usage: 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 this parameter is left blank or omitted, a default value of "Optional" is displayed.
- Valid Value(s): "mandatory"
takes
- Usage: Mandatory
- 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.
- Valid Value(s): Any string or strings.
denotes
- Usage: Mandatory
- 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.
- Valid Value(s): Any string or strings.
generates
- Usage: Mandatory
- 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.
- Valid Value(s): Any string or strings.
defaultvalue
- Usage: 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.
- Valid Value(s): Any string or strings.