Template:Param value/doc
| This is a documentation subpage for Template:Param value It contains usage information, categories and other content that is not part of the original template page. |
| This template is used on many pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
| This template uses TemplateStyles: |
This template dey provide small bordered box wey fit highlight parameter values for Template documentation pages. E dey useful especially when the values fit get spaces for front or back, or plenty spaces inside.
Usage
[edit source]{{param value|value}}
Parameters
[edit source]This template get one required positional parameter for the value, plus four optional parameters: three for changing how the display go look, and one replacement parameter for showing blank spaces:
|1=– the value wey you want make the template highlight; this one be required (no default)|border=– you fit use am set border properties. Default: <code class="tpl-pval__code" style=" color: black; Expression error: Unrecognized punctuation character "[". ">thin solid #caa. Alias:|b=.|bg-color=– you fit use am set background colour. Default: <code class="tpl-pval__code" style=" color: black; Expression error: Unrecognized punctuation character "[". ">white. Alias:|bg=.|style=– you fit use am set any CSS style properties, with one or more semicolon-separated Template:Pval pairs. Default: none.|space=– you fit use am make spaces show. Alias:|sp=. See #Making spaces visible below.
Note about special characters: If the value wey you want highlight get equal sign inside, you for escape am. Use {{=}} instead of normal equal sign character.
Examples
[edit source]{{param value|2blanks between}}dey give: <code class="tpl-pval__code" style=" Expression error: Unrecognized punctuation character "[". ">2blanks between{{param value|2blanks between|space=·}}dey give: <code class="tpl-pval__code" style=" Expression error: Unrecognized punctuation character "[". ">2blanks··between{{param value| * : # }}dey give: <code class="tpl-pval__code" style=" Expression error: Unrecognized punctuation character "[". "> * : #{{param value| * : # |border=2px dashed khaki}}dey give: <code class="tpl-pval__code" style="border:2px dashed khaki; Expression error: Unrecognized punctuation character "[". "> * : #{{param value|white|bg=yellow}}dey give: <code class="tpl-pval__code" style=" color: black; Expression error: Unrecognized punctuation character "[". ">white{{pvalue|thin solid #caa|bg=#f5fcf9}}dey give: Template:Pvalue{{pval|* #|border=thin dashed purple|bg=#ffe6e6|style=border-radius:5px|space=␠}}dey give: Template:Pval
How to make spaces show
[edit source]You fit make space characters show by replacing them with any character wey you choose using the |space= parameter. These be some characters wey people don use for this purpose before. For these examples, there be two spaces between one and two:
- Space symbol – (U+2420 = ␠):
{{param value|one two|space=␠}}⟶ <code class="tpl-pval__code" style=" Expression error: Unrecognized punctuation character "[". ">one␠␠two
- Blank symbol – (U+2422 = ␢):
{{pvalue|one two|space=␢}}⟶ Template:Pvalue
- Blank symbol – smaller: ␢ :
{{pvalue|one two|space=<small>␢</small>}}⟶ <code class="tpl-pval__code" style=" Expression error: Unrecognized punctuation character "[". ">one␢␢two
- Blank symbol – smaller: ␢ :
- Middot – (U+00B7 = ·):
{{pval|one two|space=·}}⟶ Template:Pval
- Underbracket – (U+23B5 = ⎵):
{{pval|one two|space=⎵}}⟶ Template:Pval
- White rectangle – (U+25AF = ▯):
{{pval|one two|space=▯}}⟶ Template:Pval
- Undertie – (U+203F = ‿):
{{pval|one two|space=‿}}⟶ Template:Pval