This template is used on approximately 10,000 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.
Preview message: Transclusion count updated automatically (see documentation). |
This template uses Lua: |
Typically to be used in lists to provide an annotated link using the short description for the linked page. For example: in See also sections "editors should provide a brief annotation when a link's relevance is not immediately apparent, when the meaning of the term may not be generally known, or when the term is ambiguous". By default, the short description of the linked page will be derived from the {{short description}}
template responsible for setting the short description for that page. If a template is not present in the wikitext of the page, the description will be derived from Wikidata. If no Wikidata description can be obtained, no short description will be appended. This behavior can be manipulated and other formatting options allow for the presentation of useful annotations even without a short description, which may still become available and therefore displayed at a later date.
Some pages are assigned short descriptions by automatic methods; templates that generate short descriptions include infoboxes that use the data provided to its parameters to create a suitable short description, which may overrule other short descriptions that exist for or on the page. The module responsible for fetching the description is currently not able to detect or determine this type of dynamically created short description.
This template should not be used for annotating links on disambiguation pages. The relevant discussion is at Wikipedia talk:Disambiguation/Archive 50 § Use of annotated links and concludes:
The most basic usage is:
{{Annotated link|Wikipedia}}
The text shown for the link may be piped if desired or required:
{{Annotated link|Wikipedia:Policies and guidelines|Policies and guidelines}}
{{Annotated link|Mona Lisa|''Mona Lisa''}}
Foreign language formatting options are available for the link text; see below.
If the list format is unsuitable for dash separation of the link from the description, it may be replaced with something suitable:
{{Annotated link|Wikipedia:Policies and guidelines|Policies and guidelines|,}}
The examples above use unnamed parameters 1–3. The parameters can also be named or explicitly numbered:
{{Annotated link|1=Wikipedia:Policies and guidelines|2=Policies and guidelines|3=,}}
{{Annotated link|name=Wikipedia:Policies and guidelines|display=Policies and guidelines|dash=,}}
There are many possible configurations beyond this; as described below, and most parameters have aliases.
There are many available parameters, broken down into the following sections:
Links to templates will be automatically formatted as would be expected by {{template link}}:
{{Annotated link|Template:Annotated link}}
Formatting as would be expected by {{template link expanded}}
may be applied by adding |template_link=code
:
{{ Annotated link | Template:Annotated link | template_link=code }}
{{Annotated link}}
– template used to display and annotate a wikilink using the short description of the linked pageIf this formatting is determined to be inappropriate for the circumstance; use |template_link=no
to disable it:
{{ Annotated link | Template:Annotated link | template_link=no }}
If the template link formatting is disabled; use the second parameter, |2=
or |display=
to affect the text display:
{{ Annotated link | Template:Annotated link | Annotated link | template_link=no }}
Some titles of works, such as song titles, should be double quoted; this formatting may be applied using |quote=yes
:
{{ Annotated link | The Partisan | quote=yes }}
A parenthesized abbreviation may be added following the link using |abbr=
if desired:
{{ Annotated link | London Academy of Music and Dramatic Art | abbr=LAMDA }}
A title for the abbreviation may be provided with |abbr_title=
if suitable:
{{ Annotated link | London Academy of Music and Dramatic Art | abbr=LAMDA | abbr_title=London Academy of Music and Dramatic Art }}
An alternative name for the linked entity may be added following the link (and abbreviation if also added) using |aka=
if desired; the alternative name will be prepended with ", also known as":
{{ Annotated link | Royal National Theatre | aka=the National Theatre of Great Britain }}
Foreign language formatting options are available for this parameter; see below.
Even more information may be wedged in between the previously stated information and that of the potentially following description; use |wedge=
to add it is desired:
{{ Annotated link | Grape | wedge=can be used to make wine }}
Foreign language formatting options are available for this parameter; see below.
Foreign language text should be formatted in accordance with MOS:OTHERLANG; this template provides all the necessary options to control the formatting. The module invoked by this template, uses Module:Lang (the module powering {{lang}}
) to do the formatting, and all the options are fully described on their documentation pages.
If the link text is of a foreign language (editor discretion determines if this is appropriate); control the formatting with: |link_lang=<language code>
, |link_lang_italic=
, |link_lang_nocat=
, |link_lang_size=
, |link_lang_cat=
and |link_lang_rtl=
If the |aka=
text is of a foreign language (again; editor discretion); control the formatting with: |aka_lang=<language code>
, |aka_lang_italic=
, |aka_lang_nocat=
, |aka_lang_size=
, |aka_lang_cat=
, |aka_lang_rtl=
If the |wedge=
text is of a foreign language (again; editor discretion); control the formatting with: |wedge_lang=<language code>
, |wedge_lang_italic=
, |wedge_lang_nocat=
, |wedge_lang_size=
, |wedge_lang_cat=
, |wedge_lang_rtl=
This template invokes Module:Annotated link, which in turn uses Module:GetShortDescription to (as the name suggests) get the short description. It may return a foreign language (i.e. not en) Wikidata description (again; editor discretion). If it is displayed; the appropriate language code will be set automatically, but all other parameters of {{lang}}
are available to affect the formatting of the returned description:
Use |desc_lang_italic=
, |desc_lang_nocat=
, |desc_lang_size=
, |desc_lang_cat=
and |desc_lang_rtl=
. If the editor determines that {{lang}}
formatting of the description is not appropriate; it may be disabled with |desc_lang_no=yes
.
Although this is not a realistic example; it provides an overview of this handling:
{{ Annotated link | Template:GetShortDescription/explicit short description | La page de test de Fred | aka=フレッドのテストページ | aka_lang=ja | link_lang=fr | wedge=Leathanach tástála Fred | wedge_lang=ga |template_link=no }}
Providing a value for |only=
or |prefer=
will affect the search to being either only or with a preference for the stated description. If no description is found, the result will be that no description is appended to the link (and any other information provided), unless a fallback is provided.
Stating |only=explicit
will limit the search to only short descriptions set by use of {{short description}}
on the linked page.
{{ Annotated link | Wikipedia | only=explicit }}
Stating |only=wikidata
will limit the search to only Wikidata descriptions.
{{ Annotated link | Wikipedia | only=wikidata }}
State |prefer=explicit
to use the explicit short description if available, or try for the Wikidata description if not.
{{ Annotated link | Wikipedia | prefer=explicit }}
State |prefer=wikidata
to use the Wikidata description if available, or try for an explicit short description if not.
{{ Annotated link | Wikipedia | prefer=wikidata }}
If a |fallback=
value is provided, and no description is found by the expressed route, the appended description will be the stated fallback value.
{{ Annotated link | Example | only=explicit | fallback=a fallback description }}
Short descriptions on en Wikipedia should be formatted with an uppercase first letter. By default, the short descriptions retrieved by this template are displayed as they are typed in the page from which they are extracted, but this may be overridden if required using |desc_first_letter_case=upper
or |desc_first_letter_case=lower
.
TemplateData for Annotated link
Table of all template parameters, aliases, expected and required values
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a link created and annotated using a short description and other optional additions
|
Module:GetShortDescription may create warnings about detected issues with {{short description}}
configurations, that show above the preview content during editing. These warnings are not about the page being edited, but about the pages for which the annotated links are being created. If any preview warnings are shown; please consider visiting the indicated pages to analyse and possibly fix the issues.
It may also show alarming messages (they're red but not necessarily errors) about its function. If it is not clear how to fix the problem indicated; don't continue trying to annotate the link with this template as the messages will be visible to all readers of Wikipedia. If any alarming messages are displayed on saved pages as a result of issues, the page showing those messages will be added to the maintenance Category:Pages displaying alarming messages about Module:GetShortDescription.
Module:Annotated link may also show alarming messages about its function and in much the same way will add pages to Category:Pages displaying alarming messages about Module:Annotated link.
Several other maintenance categories exist for potential issues with the annotations:
|space_cat=no
to the {{annotated link}}
to disable the categorisation. If the description is not appropriate; the interested editor can either try to fix it at the source, use |only=
to potentially select another description, or remove the use of this template and create a custom annotation for the link manually.|only=wikidata
or |prefer=wikidata
). They may or may not be suitable and this is a matter of ongoing consideration and discussion. Please consider reviewing the instances.A handy tool for finding category intersections is available.
{{AnnotatedListOfLinks}}
– wraps {{Annotated link}} around multiple links at once{{Annotated biography link}}
– a version of this template designed for biography lists{{laal}}
– displays an article's pagelinks alongside its short description