Template:Para/doc
{{#ifeq:doc |doc
|
{{#ifeq:show |show
| Script error: No such module "Message box".
}}{{#if: |
| {{#ifexist:Template:Para
| [[Category:{{#switch:Template |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
|
}}
}}
|
}}
<templatestyles src="Hatnote/styles.css"/>
#if: |Script error: No such module "Int".[[:Template:Parameter{{#if:||{{{l2}}}}}]]Script error: No such module "Int". {{ #if: | [[:{{{3}}}{{#if:||{{{l3}}}}}]]Script error: No such module "Int".<translate> or</translate>Script error: No such module "Int".[[:{{{4}}}{{#if:||{{{l4}}}}}]] |<translate> or</translate>Script error: No such module "Int".[[:{{{3}}}{{#if:||{{{l3}}}}}]] }} | {{ #if: Template:Parameter |<translate> or</translate>Script error: No such module "Int".[[:Template:Parameter{{#if:||{{{l2}}}}}]] }}}}.
Script error: No such module "Uses TemplateStyles".
Usage
This template is for giving examples of template parameter source code (useful in template documentation and talk page discussions of template code). It must have one or two parameters itself. The first is the name of the example parameter to display (this may be empty, but it must be present), and the second (optional) one is a value for the first example parameter, or (if the first <templatestyles src="Template:Mono/styles.css"/>{{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|<templatestyles src="Template:Nowrap/styles.css"/>}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:para|para]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}Template:)) parameter is empty) an unnamed example parameter.
Examples
- <templatestyles src="Template:Mono/styles.css"/>{{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|<templatestyles src="Template:Nowrap/styles.css"/>}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:para|para]]{{#if:name||name}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}Template:))
- renders as
- {{safesubst:#if:|<templatestyles src="Template:Mono/styles.css"/>}}{{safesubst:#if:{{safesubst:#switch: 1
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|<templatestyles src="Template:Nowrap/styles.css"/>}}<{{safesubst:#if:|span class="monospaced {{safesubst:#if:{{safesubst:#switch: 1
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|nowrap}}"|code {{safesubst:#if:{{safesubst:#switch: 1
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|class="nowrap"}}}}>|{{safesubst:#if:name|name=}}</{{safesubst:#if:|span|code}}>
- <templatestyles src="Template:Mono/styles.css"/>{{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|<templatestyles src="Template:Nowrap/styles.css"/>}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:para|para]]{{#if:title||title}}{{#if:<var>book title</var>||<var>book title</var>}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}Template:))
- renders as
- {{safesubst:#if:|<templatestyles src="Template:Mono/styles.css"/>}}{{safesubst:#if:{{safesubst:#switch: 1
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|<templatestyles src="Template:Nowrap/styles.css"/>}}<{{safesubst:#if:|span class="monospaced {{safesubst:#if:{{safesubst:#switch: 1
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|nowrap}}"|code {{safesubst:#if:{{safesubst:#switch: 1
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|class="nowrap"}}}}>|{{safesubst:#if:title|title=}}book title</{{safesubst:#if:|span|code}}>
- <templatestyles src="Template:Mono/styles.css"/>{{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|<templatestyles src="Template:Nowrap/styles.css"/>}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:para|para]]{{#if: || }}{{#if:section||section}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}Template:))
- renders as
- {{safesubst:#if:|<templatestyles src="Template:Mono/styles.css"/>}}{{safesubst:#if:{{safesubst:#switch: 1
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|<templatestyles src="Template:Nowrap/styles.css"/>}}<{{safesubst:#if:|span class="monospaced {{safesubst:#if:{{safesubst:#switch: 1
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|nowrap}}"|code {{safesubst:#if:{{safesubst:#switch: 1
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|class="nowrap"}}}}>|{{safesubst:#if:|=}}section</{{safesubst:#if:|span|code}}>
- (for unnamed parameters in the example code; note the empty first parameter in the <templatestyles src="Template:Mono/styles.css"/>{{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|<templatestyles src="Template:Nowrap/styles.css"/>}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:para|para]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}Template:)) template)
- <templatestyles src="Template:Mono/styles.css"/>{{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|<templatestyles src="Template:Nowrap/styles.css"/>}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:para|para]]{{#if:<var>parameter</var>||<var>parameter</var>}}{{#if:<var>value</var>||<var>value</var>}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}Template:))
- renders as
- {{safesubst:#if:|<templatestyles src="Template:Mono/styles.css"/>}}{{safesubst:#if:{{safesubst:#switch: 1
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|<templatestyles src="Template:Nowrap/styles.css"/>}}<{{safesubst:#if:|span class="monospaced {{safesubst:#if:{{safesubst:#switch: 1
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|nowrap}}"|code {{safesubst:#if:{{safesubst:#switch: 1
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|class="nowrap"}}}}>|{{safesubst:#if:parameter|parameter=}}value</{{safesubst:#if:|span|code}}>
When using literal, pre-specified values, simply provide the value (appearance as in example 3). When illustrating hypothetical, variable or user-definable values, use <var>value</var>
(appearance as in example 2), and the same should be done for non-literal, example parameters (as in example 4).
TemplateData
{{#switch:<translate></translate> |=
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|{{#ifexpr:{{#if:|{{#ifeq:Template:Para/doc|{{#switch:
|#default = | = {{#ifeq: | | Template:{{{docpage}}} | }}
}}|0|1}}|not{{#ifexpr: ( {{#ifeq:doc|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:para/doc|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|0}}}}|<templatestyles src="Module:Navbar/styles.css"/>
|#default = Para/doc | = {{#ifeq: | | Template:Para/doc | Para/doc }}
}}|<span style="" title="<translate nowrap> View this template</translate>">{{#if:|<translate> v</translate>|<translate> view</translate>}}]] · [[[:Template:Fullurl:]] <span style="" title="<translate nowrap> Discuss this template</translate>">{{#if:|<translate> d</translate>|<translate> talk</translate>}}]{{#if:|| · [{{fullurl:{{#switch:
|#default = Para/doc | = {{#ifeq: | | Template:Para/doc | Para/doc }}
}}|action=edit}} <span style="" title="<translate nowrap> Edit this template</translate>">{{#if:|<translate> e</translate>|<translate> edit</translate>}}]}}{{#if:1|]}}}}}} {{#if:||<translate> This is the [[<tvar name=1>Special:MyLanguage/Help:TemplateData</tvar>|TemplateData]] documentation for this template used by [[<tvar name=2>Special:MyLanguage/VisualEditor</tvar>|VisualEditor]] and other tools.</translate>}}
Para
{{#ifeq:doc|sandbox||{{#if:{{#ifexpr: (
{{#ifeq:doc|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:para/doc|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}|[[Category:TemplateData documentation{{#translation:}}]]|[[Category:Templates using TemplateData{{#translation:}}]]}}}} | #default=
Script error: No such module "Template translation".
}} Script error: No such module "TNT".
See also
- {{ApiParam}} – for documenting API parameters
<templatestyles src="Module:Navbar/styles.css"/>
|#default = Tl-nav | = {{#ifeq: | | Template:Tl-nav | Tl-nav }}
}}|<span style="" title="<translate nowrap> View this template</translate>">{{#if:|<translate> v</translate>|<translate> view</translate>}}]] · [[[:Template:Fullurl:]] <span style="" title="<translate nowrap> Discuss this template</translate>">{{#if:|<translate> d</translate>|<translate> talk</translate>}}]{{#if:|| · [{{fullurl:{{#switch:
|#default = Tl-nav | = {{#ifeq: | | Template:Tl-nav | Tl-nav }}
}}|action=edit}} <span style="" title="<translate nowrap> Edit this template</translate>">{{#if:|<translate> e</translate>|<translate> edit</translate>}}]}}{{#if:|]}}
Text style ↓ | <templatestyles src="Template:Mono/styles.css"/>{{#if:{{safesubst:#switch: | no | n | false | 0 = | = | ¬ = | yes | y | true | 1 = yes | #default = yes
}}|<templatestyles src="Template:Nowrap/styles.css"/>}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:tlg|tlg]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}Template:)) optionsTemplate:NoteTag |
Link style | ||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Linked | Unlinked | Linked with subst | |||||||||||||
<templatestyles src="Template:Mono/styles.css"/>{{#if:{{safesubst:#switch: | no | n | false | 0 = | = | ¬ = | yes | y | true | 1 = yes | #default = yes
}}|<templatestyles src="Template:Nowrap/styles.css"/>}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:tlg|tlg]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}Template:)) optionsTemplate:NoteTag |
Template:N/a | Template:N/a | nolink=1
|
subst=1
|
normal | Template:N/a | Template:Unbulleted list | Template:Unbulleted list | Template:Unbulleted list | |||||||||||
code
|
code=1
|
Template:Unbulleted list | Template:Unbulleted list | Template:Unbulleted list | |||||||||||
Template:Mono | mono=1 |
Template:Unbulleted list | colspan="2" rowspan="3" Template:N/a | ||||||||||||
plaincode
|
plaincode=1 | ||||||||||||||
kbd | kbd=1 |