Warning | This template is used on approximately 142,000 pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
Template:Tlr Provides a lightly bordered box to highlight param values on Template documentation pages. Especially useful in cases where values may have leading or trailing blanks, or multiple embedded blanks.
Usage[edit source]
{{param value|value}}
Parameters[edit source]
There is one required positional parameter for the value, and four optional params: three for styling the display, and one replacement parameter for dealing with how to render a blank space:
|1=
Template:Sndthe value to be highlighted; required (no default)|border=
Template:Sndmay be used to set border attributes. default:Template:Replace
. Alias:|b=
.|bg-color=
Template:Sndmay be used to set background-color. default:Template:Replace
. Alias:|bg=
.|style=
Template:Snd may be used to set any CSS style attributes, with one or more semicolon-separatedTemplate:Replace
pairs. default:none.|space=
Template:Snd may be used to make spaces visible. Alias:|sp=
. See #Making spaces visible below.
Note on special characters: if the value to be highlighted contains an equal sign, it must be escaped: use {{=}}
instead of a bare equal sign character.
Examples[edit source]
{{param value|2blanks between}}
yields:Template:Replace
{{param value|2blanks between|space=·}}
yields:Template:Replace
{{param value| * : # }}
yields:Template:Replace
{{param value| * : # |border=2px dashed khaki}}
yields:Template:Replace
{{param value|white|bg=yellow}}
yields:Template:Replace
{{pvalue|thin solid #caa|bg=#f5fcf9}}
yields: Template:Pvalue{{pval|* #|border=thin dashed purple|bg=#ffe6e6|style=border-radius:5px|space=␠}}
yields:Template:Replace
Making spaces visible[edit source]
You may make space characters visible by replacing them with any character you choose using param |space=
. Here are some characters that have been historically used for this purpose. In these examples, there are two spaces between one and two:
- Space symbolTemplate:Snd(U+2420 = ␠ ) :
{{param value|one two|space=␠}}
⟶Template:Replace
- Blank symbolTemplate:Snd(U+2422 = ␢ ) :
{{pvalue|one two|space=␢}}
⟶ Template:Pvalue- Blank symbolTemplate:Snd (smaller: ␢) :
{{pvalue|one two|space=<small>␢</small>}}
⟶Template:Replace
- Blank symbolTemplate:Snd (smaller: ␢) :
- MiddotTemplate:Snd(U+00B7 = · ) :
{{pval|one two|space=·}}
⟶Template:Replace
- UnderbracketTemplate:Snd(U+23B5 = ⎵ ) :
{{pval|one two|space=⎵}}
⟶Template:Replace
- White rectangleTemplate:Snd(U+25AF = ▯ ) :
{{pval|one two|space=▯}}
⟶Template:Replace
- UndertieTemplate:Snd(U+203F = ‿ ) :
{{pval|one two|space=‿}}
⟶Template:Replace
See also[edit source]
Lua error in package.lua at line 80: module 'Module:Navbar' not found.