Template:Para
|{{#if:|{{{1}}}=}}
{{#ifeq:para |doc
|
{{#ifeq:show |show
|This is a documentation subpage for Template:Para. It contains usage information, categories and other content that is not part of the original {{#if: |{{{text2}}} |{{#if: |{{{text1}}} |{{#ifeq:Template |User |template template page |{{#if:Template |template page|article}}}}}}}}. |
}}{{#if: | | {{#ifexist:Template:Para | [[Category:{{#switch:Template |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | }} }} | }}
<templatestyles src="Template:Ombox/styles.css" />
This {{
|Module=Lua module
|#default=template
}} is used on {{#if:558,000+|558,000+|a very large number of}} pages.
|Module=module |#default=template }} should first be tested in its [[{{
| doc | sandbox = Template:Para | #default = Template:Para }}/sandbox|/sandbox]] or [[{{
| doc | sandbox = Template:Para | #default = Template:Para }}/testcases|/testcases]] subpages{{
|Module=. |#default= or in your own user subpage. }} The tested changes can then be added to this page in a single edit. Please consider discussing any changes {{#if:|at [[{{{2}}}]]|on the [[{{
| doc | sandbox = Template talk:Para | #default = Template talk:Para }}|talk page]]}} before implementing them. |
Usage[edit]
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 parameter is the name of the example parameter to display (this may be empty, but it must be present), and the second (optional) parameter is a value for the first example parameter or, if the first {{{{#if: |subst:}}para{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
parameter is empty, an unnamed example parameter.
Examples[edit]
Code | Result | Notes |
---|---|---|
subst:}}para{{#if:name ||name}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}} | name=}} | |
subst:}}para{{#if:title ||title}}{{#if:<var>book title</var> ||<var>book title</var>}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}} | title=}}book title | |
subst:}}para{{#if: || }}{{#if:section ||section}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}} | =}}section | For unnamed parameters; note empty first parameter in the code |
subst:}}para{{#if:<var>parameter</var> ||<var>parameter</var>}}{{#if:<var>value</var> ||<var>value</var>}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}} | parameter=}}value |
When using literal, pre-specified values, simply provide the value (as in the third example above). When illustrating hypothetical, variable, or user-definable values, use <var>value</var>
(as in the second example above). The same should be done for non-literal, example parameters (fourth example above).
See also[edit]
See also the three tables below; they describe the family of approximately forty templates built for talking about templates.
Here are some related templates or subjects not found in the tables:
General-purpose formatting[edit]
Link style ? | Linked | Unlinked | Linked with subst | Linked including braces | Linked with alternative text | |
---|---|---|---|---|---|---|
Text style ? | subst:}}tlg{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}} options1 ? | N/A | <syntaxhighlight lang="text" class="" id="" style="" inline="1">nolink=yes</syntaxhighlight> | <syntaxhighlight lang="text" class="" id="" style="" inline="1">subst=yes</syntaxhighlight> | <syntaxhighlight lang="text" class="" id="" style="" inline="1">braceinside=yes</syntaxhighlight> | <syntaxhighlight lang="text" class="" id="" style="" inline="1">alttext=Foo</syntaxhighlight> <syntaxhighlight lang="text" class="" id="" style="" inline="1">2=Foo</syntaxhighlight> |
normal | DEFAULT | subst:}}tlg{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}1{{{{#if: |subst:}}tl{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}} {{{{#if: |subst:}}tlp{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}} 2{{{{#if: |subst:}}tlu{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}} 3
|
subst:}}tlf{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}2 | subst:}}tls{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}{{{{#if: |subst:}}tlsp{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
|
subst:}}tn{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}} | subst:}}tla{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}} |
code
|
<syntaxhighlight lang="text" class="" id="" style="" inline="1">code=yes</syntaxhighlight> | subst:}}tl2{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}{{{{#if: |subst:}}tlx{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}} {{{{#if: |subst:}}tlxu{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}} 3
|
subst:}}tlc{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}2{{{{#if: |subst:}}tld{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}} 2{{{{#if: |subst:}}tnull{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
|
subst:}}tlxs{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}} | N/A | |
monospace kbd |
<syntaxhighlight lang="text" class="" id="" style="" inline="1">plaincode=yes</syntaxhighlight>4 <syntaxhighlight lang="text" class="" id="" style="" inline="1">kbd=yes</syntaxhighlight>5 |
subst:}}tltt{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}5{{{{#if: |subst:}}tltt2{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}} 5
|
N/A | subst:}}tltts{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}5{{{{#if: |subst:}}tltts3{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}} 5{{{{#if: |subst:}}tltss{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}} 6
|
N/A | |
bold | <syntaxhighlight lang="text" class="" id="" style="" inline="1">bold=yes</syntaxhighlight> | subst:}}tlb{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}} | N/A | |||
bold+code
|
code=yes</syntaxhighlight> | subst:}}tlxb{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}} | ||||
italic+code
|
code=yes</syntaxhighlight> | subst:}}tlxi{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}} |
- 1
{{{{#if: |subst:}}tlg{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
is the most general, allowing any combination of text style and/or link style options. - 2 Prevents wrapping of text by placing it inside
{{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <span{{#if:class="nowrap"| class="nowrap"}}
}}{{#switch:pair
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:span|!--||>}}...
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:span|!--|-->|</span>}}
}}
tags.
- 3 Allows links to templates in any namespace.
- 4 {{#if:{{#if:||yes}} |}}{{#if:yes |
|{{#if:|
}} }}{{#if: |}}{{#if: |}}{{#if: | |{{}}{{#if: |subst:}}{{#if: |}}{{#if:yes || {{#if: |{}}[[:{{#ifeq:t|: |Tlg |{{#switch:
| = Template:{{#if:tlg|Tlg|Para}}
| #default = {{#if:tlg|Tlg|Template:Para}}
}}}}|}}{{#if: |{}}{{#if:tlg|tlg|{{#ifeq:Template|Template|Para|Template:Para}}}}{{#if: |}}}{{#if:yes | |]]{{#if: |}}}}}{{#if: |}}{{#if: |}}{{#if: |}}{{#ifeq:�|� | ||{{{2}}}}}{{#ifeq:�|� | ||{{{3}}}}}{{#ifeq:�|� | ||{{{4}}}}}{{#ifeq:�|� | ||{{{5}}}}}{{#ifeq:�|� | ||{{{6}}}}}{{#ifeq:�|� | ||{{{7}}}}}{{#ifeq:�|� | ||{{{8}}}}}{{#ifeq:�|� | ||{{{9}}}}}{{#ifeq:�|� | ||{{{10}}}}}{{#ifeq:�|� | ||{{{11}}}}}{{#if: ||�}}{{#if: |}}{{#if: | |}}}}{{#if: |}}{{#if:yes |
}}{{#if:{{#if:||yes}} |}} uses {{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <code{{#if:style="border:none; background:transparent;"| style="border:none; background:transparent;"}}
}}{{#switch:pair
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:code|!--||>}}...
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:code|!--|-->|</code>}}
}}
.
- 5 Displays monospaced font using
{{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <kbd{{#if:| {{{params}}}}}
}}{{#switch:pair
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:kbd|!--||>}}...
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:kbd|!--|-->|</kbd>}}
}}
tags (changed from {{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <tt{{#if:| {{{params}}}}}
}}{{#switch:pair
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:tt|!--||>}}...
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:tt|!--|-->|</tt>}}
}}
for HTML5 compliance).
- 6 Displays monospaced font using
{{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <span{{#if:style="font-family:monospace;"| style="font-family:monospace;"}}
}}{{#switch:pair
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:span|!--||>}}...
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:span|!--|-->|</span>}}
}}
.
|
- 1
{{{{#if: |subst:}}tlg{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
is the most general, allowing any combination of text style and/or link style options.
- 2 Prevents wrapping of text by placing it inside
{{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <span{{#if:class="nowrap"| class="nowrap"}}
}}{{#switch:pair
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:span|!--||>}}...
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:span|!--|-->|</span>}}
}}
tags.
- 3 Allows links to templates in any namespace.
- 4 {{#if:{{#if:||yes}} |}}{{#if:yes |
|{{#if:|}} }}{{#if: |}}{{#if: |}}{{#if: | |{{}}{{#if: |subst:}}{{#if: |}}{{#if:yes || {{#if: |{}}[[:{{#ifeq:t|: |Tlg |{{#switch:
| = Template:{{#if:tlg|Tlg|Para}}
| #default = {{#if:tlg|Tlg|Template:Para}}
}}}}|}}{{#if: |{}}{{#if:tlg|tlg|{{#ifeq:Template|Template|Para|Template:Para}}}}{{#if: |}}}{{#if:yes | |]]{{#if: |}}}}}{{#if: |}}{{#if: |}}{{#if: |}}{{#ifeq:�|� | ||{{{2}}}}}{{#ifeq:�|� | ||{{{3}}}}}{{#ifeq:�|� | ||{{{4}}}}}{{#ifeq:�|� | ||{{{5}}}}}{{#ifeq:�|� | ||{{{6}}}}}{{#ifeq:�|� | ||{{{7}}}}}{{#ifeq:�|� | ||{{{8}}}}}{{#ifeq:�|� | ||{{{9}}}}}{{#ifeq:�|� | ||{{{10}}}}}{{#ifeq:�|� | ||{{{11}}}}}{{#if: ||�}}{{#if: |}}{{#if: | |}}}}{{#if: |}}{{#if:yes |
}}{{#if:{{#if:||yes}} |}} uses {{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <code{{#if:style="border:none; background:transparent;"| style="border:none; background:transparent;"}}
}}{{#switch:pair
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:code|!--||>}}...
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:code|!--|-->|</code>}}
}}
.
- 5 Displays monospaced font using
{{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <kbd{{#if:| {{{params}}}}}
}}{{#switch:pair
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:kbd|!--||>}}...
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:kbd|!--|-->|</kbd>}}
}}
tags (changed from {{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <tt{{#if:| {{{params}}}}}
}}{{#switch:pair
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:tt|!--||>}}...
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:tt|!--|-->|</tt>}}
}}
for HTML5 compliance).
- 6 Displays monospaced font using
{{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <span{{#if:style="font-family:monospace;"| style="font-family:monospace;"}}
}}{{#switch:pair
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:span|!--||>}}...
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:span|!--|-->|</span>}}
}}
.
}}
Other formatting templates[edit]
Code example
Effect
Notes
subst:}}tl2{{#if:Hatnote|lang=fr ||Hatnote|lang=fr}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
{{[[:{{ safesubst:#if: | {{{sister}}}: }}{{ safesubst:#if: fr | fr: }}Template:hatnote|hatnote]]{{ safesubst:#if: | |{{{2}}} }}{{ safesubst:#if: | |{{{3}}} }}}}
Supports linking to sister projects (e.g., fr:Hatnote)
subst:}}tlu{{#if:User:Ahunt/SSHFS ||User:Ahunt/SSHFS}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
{{User:Ahunt/SSHFS{{#if:|
|{{{2}}}
}}{{#if:|
|{{{3}}}
}}{{#if:|
|{{{4}}}
}}{{#if:|
|{{{5}}}
}}{{#if:|
|{{{6}}}
}}{{#if:|
|{{{7}}}
}}{{#if:|
|{{{8}}}
}}{{#if:|
|{{{9}}}
}}{{#if:|
|{{{10}}}
}}{{#if:|
|{{{11}}}
}}{{#if:|
|...
}}}} || Supports linking to any namespace
subst:}}demo{{#if:<nowiki>{{Hatnote|lang=fr|Some text}}</nowiki> ||<nowiki>{{Hatnote|lang=fr|Some text}}</nowiki>}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
{{hatnote|lang=fr|Some text}}
Shows code and example
subst:}}xpd{{#if:Hatnote|Some hatnote text ||Hatnote|Some hatnote text}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:+|-|1|2}}|Template:Xpd3|{{ safesubst:p{{ safesubst:#ifeq:eq|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:-|+|1|2}}|Template:Xpd2|{{ safesubst:p{{ safesubst:#ifeq:eq|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:Some hatnote text|Some hatnote text|1|2}}|"{{{{#if:|Template:Xpd/wl|hatnote}}|{{#switch:p{{#switch:pSome hatnote textq|p q=&s|p
q=&nl|p*q=&*|p#q=&#|p:q=&:|Some hatnote text}}q|p
- q|p
- q|p
- q|p
- q|p
- q|p
- q|p
- q|p
- q|p
- q=
}}{{#switch:{{#switch:pSome hatnote textq|p q=&s|p
q=&nl|p*q=&*|p#q=&#|p:q=&:|Some hatnote text}}|{={|&p=||}=}|&e==|&nl=
|&*=*|&#=#|&:=:}}{{ {{#switch:{{#switch:pSome hatnote textq|p q=&s|p
q=&nl|p*q=&*|p#q=&#|p:q=&:|Some hatnote text}}|{|&p|}|&e|&s|&nl|&*|&#|&:|*|**|***|#|##|###|:|::|:::|;=void|1x}}|{{#switch:pSome hatnote textq|p q=&s|p
q=&nl|p*q=&*|p#q=&#|p:q=&:|Some hatnote text}}}}{{#switch:{{#switch:pSome hatnote textq|p q=&s|p
q=&nl|p*q=&*|p#q=&#|p:q=&:|Some hatnote text}}|*=*|**=**|***=***|#=#|##=##|###=###|:=:|::=::|:::=:::|;=;}}{{ {{#switch:{{#switch:pSome hatnote textq|p q=&s|p
q=&nl|p*q=&*|p#q=&#|p:q=&:|Some hatnote text}}|&s=1x|void}}| }}{{#ifeq:{{#switch:pSome hatnote textq|p q=&s|p
q=&nl|p*q=&*|p#q=&#|p:q=&:|Some hatnote text}}|&|amp;}}}}"
gives " " hatnote textq|p q=&s|p_q=&nl|p*q=&*|p#q=&#|p:q=&:|Some hatnote text}}q|p_*q|p_**q|p_***q|p_#q|p_##q|p_###q|p_:q|p_::q|p_:::q=%0d}}{{#switch:{{#switch:pSome hatnote textq|p q=&s|p_q=&nl|p*q=&*|p#q=&#|p:q=&:|Some hatnote text}}|&p=%7c|&e=%3d|&s=+|&nl=%0d|&*=%2a|&#=%23|&:=%3a|%7B%7B%23switch%3ApSome+hatnote+textq%7Cp+q%3D%26s%7Cp%0Aq%3D%26nl%7Cp%2Aq%3D%26%2A%7Cp%23q%3D%26%23%7Cp%3Aq%3D%26%3A%7CSome+hatnote+text%7D%7D}}%7D%7D%22|Template:Xpd0}}|{{ safesubst:p{{ safesubst:#ifeq:Some hatnote text|1|2}}|Some hatnote text|"{{{{#if:|Template:Xpd/wl|hatnote}}|{{#switch:p{{#switch:pSome hatnote textq|p q=&s|p
q=&nl|p*q=&*|p#q=&#|p:q=&:|Some hatnote text}}q|p
- q|p
- q|p
- q|p
- q|p
- q|p
- q|p
- q|p
- q|p
- q=
}}{{#switch:{{#switch:pSome hatnote textq|p q=&s|p
q=&nl|p*q=&*|p#q=&#|p:q=&:|Some hatnote text}}|{={|&p=||}=}|&e==|&nl=
|&*=*|&#=#|&:=:}}{{ {{#switch:{{#switch:pSome hatnote textq|p q=&s|p
q=&nl|p*q=&*|p#q=&#|p:q=&:|Some hatnote text}}|{|&p|}|&e|&s|&nl|&*|&#|&:|*|**|***|#|##|###|:|::|:::|;=void|1x}}|{{#switch:pSome hatnote textq|p q=&s|p
q=&nl|p*q=&*|p#q=&#|p:q=&:|Some hatnote text}}}}{{#switch:{{#switch:pSome hatnote textq|p q=&s|p
q=&nl|p*q=&*|p#q=&#|p:q=&:|Some hatnote text}}|*=*|**=**|***=***|#=#|##=##|###=###|:=:|::=::|:::=:::|;=;}}{{ {{#switch:{{#switch:pSome hatnote textq|p q=&s|p
q=&nl|p*q=&*|p#q=&#|p:q=&:|Some hatnote text}}|&s=1x|void}}| }}{{#ifeq:{{#switch:pSome hatnote textq|p q=&s|p
q=&nl|p*q=&*|p#q=&#|p:q=&:|Some hatnote text}}|&|amp;}}}}"
gives " " hatnote textq|p q=&s|p_q=&nl|p*q=&*|p#q=&#|p:q=&:|Some hatnote text}}q|p_*q|p_**q|p_***q|p_#q|p_##q|p_###q|p_:q|p_::q|p_:::q=%0d}}{{#switch:{{#switch:pSome hatnote textq|p q=&s|p_q=&nl|p*q=&*|p#q=&#|p:q=&:|Some hatnote text}}|&p=%7c|&e=%3d|&s=+|&nl=%0d|&*=%2a|&#=%23|&:=%3a|%7B%7B%23switch%3ApSome+hatnote+textq%7Cp+q%3D%26s%7Cp%0Aq%3D%26nl%7Cp%2Aq%3D%26%2A%7Cp%23q%3D%26%23%7Cp%3Aq%3D%26%3A%7CSome+hatnote+text%7D%7D}}%7D%7D%22}}}}}}|{{ safesubst:p{{ safesubst:#ifeq:-|1|2}}|+|Template:Xpd2}}}}}}|{{ safesubst:p{{ safesubst:#ifeq:+|1|2}}|-|Template:Xpd3}}}} || Shows code, example and a link to expand the template code
subst:}}para{{#if:title|<var>book title</var> ||title|<var>book title</var>}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
title=}}book title
Formats template parameters for display, with or without values
subst:}}elc{{#if:Template:Hatnote ||Template:Hatnote}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
{{{{#if: |subst:}}elc{{#if:Template:Hatnote|Hatnote ||Template:Hatnote|Hatnote}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
[[Template:Hatnote{{#if:
{{{2}}}}}]]
[[Template:Hatnote|Hatnote{{#if:
{{{2}}}}}]]
Formats wikilink, with optional piped link text and blended suffix
With utility links[edit]
Code example
Effect
subst:}}lts{{#if:Hatnote ||Hatnote}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
Template:Hatnote(edit talk links history)
subst:}}t links{{#if:Hatnote ||Hatnote}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
{{#if:{{safesubst:#switch: no
no
n
false
0 =
=
� =
yes
y
true
1 = yes
#default = yes
}}{{#ifeq:no|no||yes2}}|Template:T links/sandbox links|Hatnote (edit talk history links # /subpages /doc /doc edit /sbox /sbox diff /test)}}{{#if:| [[Module:]]|{{#if:{{{module}}}|{{#ifexist:Module:hatnote|
- REDIRECT [[Template:�]]
Module:hatnote}}|}}}}
subst:}}tfd links{{#if:Hatnote ||Hatnote}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
Template:Hatnote (edit � talk � history � links � logs � subpages � delete)
subst:}}tiw{{#if:Hatnote ||Hatnote}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
{{#if:
[[:{{#if:hatnote|hatnote:|}}Template:{{{2}}}]] {{#if:([[:{{#if:hatnote|hatnote:|}}Special:Whatlinkshere/Template:{{{2}}}|backlinks]] [{{fullurl:hatnote:Template:{{{2}}}|action=edit}} edit])
([[:{{#if:hatnote|hatnote:|}}Special:Whatlinkshere/Template:{{{2}}}|backlinks]] [{{fullurl:hatnote:Template:{{{2}}}|action=edit}} edit])
90%
}}
Template:hatnote {{#if:(backlinks edit)
(backlinks edit)
90%
}}
}}
subst:}}tltt{{#if:Hatnote ||Hatnote}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
{{Hatnote{{#if:
{{{par}}}}}{{#if:
{{{par2}}}}}}}
subst:}}tetl{{#if:Hatnote ||Hatnote}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
{{Hatnote{{#if: | |{{{2}}} }}{{#if: | |{{{3}}} }}{{#if: | |{{{4}}} }}{{#if: | |etc. }}}}
subst:}}tsetl{{#if:Hatnote ||Hatnote}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
{{subst:Hatnote{{#if: | |{{{2}}}}}{{#if: | |{{{3}}}}}{{#if: | |{{{4}}}}}{{#if: | |etc.}}}}
subst:}}ti{{#if:Hatnote ||Hatnote}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
Template:Hatnote (talk⧼dot-separator⧽links⧼dot-separator⧽edit)
subst:}}tic{{#if:Hatnote ||Hatnote}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
Template:Hatnote (talk links edit)
subst:}}tiw{{#if:Hatnote ||Hatnote}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
{{#if:
[[:{{#if:Hatnote|Hatnote:|}}Template:{{{2}}}]] {{#if:([[:{{#if:Hatnote|Hatnote:|}}Special:Whatlinkshere/Template:{{{2}}}|backlinks]] [{{fullurl:Hatnote:Template:{{{2}}}|action=edit}} edit])
([[:{{#if:Hatnote|Hatnote:|}}Special:Whatlinkshere/Template:{{{2}}}|backlinks]] [{{fullurl:Hatnote:Template:{{{2}}}|action=edit}} edit])
90%
}}
Template:Hatnote {{#if:(backlinks edit)
(backlinks edit)
90%
}}
}}
subst:}}tlt{{#if:Hatnote ||Hatnote}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
{{Hatnote}} (talk)
subst:}}ttl{{#if:Hatnote ||Hatnote}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
{{#switch:
{{#if:
{{{demospace}}}
main
other
}}
}}
main = Did you mean {{s-ttl}}?
other
#default =
subst:}}twlh{{#if:Hatnote ||Hatnote}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||�}}}}
Template:Hatnote (links, talk)
{{#ifeq:Para|sandbox||
}}
The above documentation is transcluded from Template:Para/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |
{{#if:|
[[Category:Template documentation pages{{#translation:}}]]
}}