Template:Param/doc
This template is for giving examples of template parameter source code which is useful in template documentation and talk page discussions of template code.
Usage
{{param|foo}}
→{{{foo}}}
{{param|foo|tag=kbd}}
→ {{{foo}}}{{param|foo|bar}}
→{{{foo|bar}}}
{{param|foo|{{param|bar|nested=1}}}}
→{{{foo|{{{bar}}}}}}
{{param|foo|{{param|bar|{{param|baz|derp|nested=1}}|nested=1}}}}
→{{{foo|{{{bar|{{{baz|derp}}}}}}}}}
Examples involving {{para}}
{{para|foo|{{param|bar}}}}
→|foo=
{{{bar}}}
{{para|foo|{{param|bar|nested=1}}}}
→|foo={{{bar}}}
{{para|foo}}{{param|bar}}
→|foo=
{{{bar}}}
{{para|foo|{{var|bar}}}}
→|foo=bar
TemplateData
This is the TemplateData documentation for this template used by VisualEditor and other tools.
Param/doc
<templatedata>
{
"description": "This template is for giving examples of template parameter source code which is useful in template documentation and talk page discussions of template code.",
"format": "inline",
"params": {
"1": {
"label": "Name",
"description": "The parameter name",
"required": true,
"type": "string"
},
"2": {
"label": "Value",
"description": "The parameter value",
"type": "string"
},
"nested": {
"label": "Nested?",
"description": "Whether to not wrap in tags.",
"default": "0",
"autovalue": "1",
"type": "boolean"
},
"tag": {
"label": "Nested Tag Name",
"description": "The name of the tag to wrap in. Used only when “nested” is falsy.",
"suggestedvalues": [
"code",
"samp",
"var"
],
"default": "code",
"type": "string"
}
}
}
</templatedata>
See also
- {{para|foo|bar}} →
|foo=bar