Template:Abbr/doc: Difference between revisions

From Guild of Archivists
(Create documentation page for 'Abbr' template using TemplateData.)
 
(Move description to the top of the page, to enable wiki formatting. Rewrite the description to make it clearer. Move template data down into separate section.)
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 20: Line 33:
}
}
},
},
"description": "A template that behaves similarly to the {{tlx|hover text}} template in that it provides both page content text and text that appears when that page content text is hovered over, but is specifically designed to be used with abbreviations.\n\n''Note'': Despite behaving similarly to {{tlx|hover text}}, the order of the parameters differs due to the two templates having different intended uses.\n\n''Example'': {{abbr|DRC|D'ni Restoration Council}}",
"paramOrder":
"paramOrder":
[
[

Revision as of 04:33, 29 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

No description.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Abbreviation1 shortform

The abbreviation that will be included directly into the page text.

Example
DRC
Stringoptional
Full Text2 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.

Example
D'ni Restoration Council
Stringrequired