Difference between revisions of "Template:Template Parameter"

m
m
Line 27: Line 27:
 
|validvalues=Any string.
 
|validvalues=Any string.
 
}}
 
}}
===name===
+
{{Template:Parameter Explanation
* '''Usage:''' Mandatory
+
|name=usage
* '''Description:''' The <span style="font-family:monospace;">name</span> 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.
+
|takes=a string
* '''Valid Value(s):''' Any string.
+
|denotes=whether the use of the parameter is mandatory or optional
 
+
|generates=the "Usage" bullet point
 
+
|defaultvalue=Optional
===usage===
+
|othernotes=The value of "Optional" will also be displayed if a value is supplied that is not "mandatory."
* '''Usage:''' Optional
+
|validvalues="mandatory"
* '''Description:''' The <span style="font-family:monospace;">usage</span> 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"
+
{{Template:Parameter Explanation
 
+
|name=takes
 
+
|usage=mandatory
===takes===
+
|takes=a string or strings
* '''Usage:''' Mandatory
+
|denotes=what type of values the parameter takes in
* '''Description:''' The <span style="font-family:monospace;">takes</span> 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.
+
|generates=the middle of the first sentence in the parameter's "Description" bullet point
* '''Valid Value(s):''' Any string or strings.
+
|validvalues=Any string or strings.
 
+
}}
 
+
{{Template:Parameter Explanation
===denotes===
+
|name=denotes
* '''Usage:''' Mandatory
+
|usage=mandatory
* '''Description:''' The <span style="font-family:monospace;">denotes</span> 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.
+
|takes=a string or strings
* '''Valid Value(s):''' Any string or strings.
+
|denotes=what the value passed to the parameter corresponds to
 
+
|generates=the end of the first sentence in the parameter's "Description" bullet point
 
+
|validvalues=Any string or strings.
===generates===
+
}}
* '''Usage:''' Mandatory
+
{{Template:Parameter Explanation
* '''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.
+
|name=generates
* '''Valid Value(s):''' Any string or strings.
+
|usage=mandatory
 
+
|takes=a string or strings
===defaultvalue===
+
|denotes=what the parameter's data is used for
* '''Usage:''' Optional
+
|generates=the second sentence in the parameter's "Description" bullet point
* '''Description:''' The <span style="font-family:monospace;">defaultvalue</span> 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 <span style="font-family:monospace;">defaultvalue</span> is displayed." after the sentence generated by <span style="font-family:monospace;">generates</span>.
+
|validvalues=Any string or strings.
* '''Valid Value(s):''' Any string or strings.
+
}}
 +
{{Template:Parameter Explanation
 +
|name=defaultvalue
 +
|takes=a string or strings
 +
|denotes=what will be displayed if a parameter that has a default value is left blank or omitted
 +
|generates=a sentence reading "If this parameter is left blank or omitted, a default value of <span style="font-family:monospace;">defaultvalue</span> is displayed." after the sentence generated by <span style="font-family:monospace;">generates</span>
 +
|validvalues=Any string or strings.
 +
}}
 +
{{Template:Parameter Explanation
 +
|name=othernotes
 +
|takes=a string or strings
 +
|denotes=any other relevant information about the parameter
 +
|generates=a sentence or sentences at the end of the "Description" bullet point
 +
|validvalues=Any string or strings.
 +
}}
 +
{{Template:Parameter Explanation
 +
|name=validvalues
 +
|usage=Mandatory
 +
|takes=a string or strings
 +
|denotes=any and all values that are valid to be passed to the parameter
 +
|generates=the "Valid Value(s)" bullet point
 +
|validvalues=Any string or strings.
 +
}}
 
</noinclude><includeonly>==={{{name}}}===
 
</noinclude><includeonly>==={{{name}}}===
 
* '''Usage:''' {{#ifeq: {{{usage|}}} | mandatory | Mandatory | Optional}}
 
* '''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:18, 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 Template:Parameter Explanation Template:Parameter Explanation Template:Parameter Explanation Template:Parameter Explanation Template:Parameter Explanation Template:Parameter Explanation Template:Parameter Explanation