Template:Abbr/doc: Difference between revisions
(Create documentation page for 'Abbr' template using TemplateData.) |
m (Mark 'shortform' parameter as required.) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
A template for simplifying the marking of abbreviations and providing their unabbreviated forms as hover text. | |||
'''Note''': Despite behaving similarly to the {{tlx|hover text}} template, the order of the parameters differs due to the two templates having different intended uses. The {{tlx|hover text}} template is intended to be used wherever hover text might be stylistically desired, whereas the {{tlx|abbr}} template is ''specifically'' for use with abbreviations. | |||
'''Examples''': | |||
* <code><nowiki>{{abbr|n.|noun}}</nowiki></code> → {{abbr|n.|noun}} | |||
* <code><nowiki>{{abbr|v.|verb}}</nowiki></code> → {{abbr|v.|verb}} | |||
* <code><nowiki>{{abbr|adj.|adjective}}</nowiki></code> → {{abbr|adj.|adjective}} | |||
* <code><nowiki>{{abbr|adc.|adverb}}</nowiki></code> → {{abbr|adc.|adverb}} | |||
* <code><nowiki>{{abbr|DRC|D'ni Restoration Council}}</nowiki></code> → {{abbr|DRC|D'ni Restoration Council}} | |||
== Template Data == | |||
<templatedata> | <templatedata> | ||
{ | { | ||
Line 9: | Line 22: | ||
"description": "The abbreviation that will be included directly into the page text.", | "description": "The abbreviation that will be included directly into the page text.", | ||
"example": "DRC", | "example": "DRC", | ||
"type": "string" | "type": "string", | ||
"required": true | |||
}, | }, | ||
"2": { | "2": { | ||
Line 20: | Line 34: | ||
} | } | ||
}, | }, | ||
"paramOrder": | "paramOrder": | ||
[ | [ |
Latest revision as of 07:10, 30 November 2024
A template for simplifying the marking of abbreviations and providing their unabbreviated forms as hover text.
Note: Despite behaving similarly to the {{hover text}}
template, the order of the parameters differs due to the two templates having different intended uses. The {{hover text}}
template is intended to be used wherever hover text might be stylistically desired, whereas the {{abbr}}
template is specifically for use with abbreviations.
Examples:
{{abbr|n.|noun}}
→ n.{{abbr|v.|verb}}
→ v.{{abbr|adj.|adjective}}
→ adj.{{abbr|adc.|adverb}}
→ adc.{{abbr|DRC|D'ni Restoration Council}}
→ DRC
Template Data[edit source]
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Abbreviation | 1 shortform | The abbreviation that will be included directly into the page text.
| String | required |
Full Text | 2 longform | The full text of which the abbreviation is a shortened form. The text that shall appear when the abbreviation in the page text is hovered over.
| String | required |