Content deleted Content added
Fred Gandt (talk | contribs) uses Module:Arguments again |
Fred Gandt (talk | contribs) currently working on this and the doc of Module:GetShortDescription to ensure consistency (since they're very closely related); this one has a long way to go yet |
||
Line 18:
}}</nowiki></pre>
=== name ===
By providing only the '''required''' page name (including namespace), the module will use [[Module:GetShortDescription]] to look for an explicit {{tlx|short description}} in that page, but if not found, will try to fetch the wikidata description. If a description is found, it will be appended to a link created for the named page in the style expected for the likes of [[MOS:SEEALSO]]. If no description is found, the link will be created but no extra information will be appended – unless the extensive following parameters are employed.
As this module is responsible for the use of all features of Module:GetShortDescription; all the parameters for that module are available through this module; see [[#Module:GetShortDescription parameters]] (below).
'''Markup:''' <code><nowiki>{{#invoke:AnnotatedLink|main |name=The Partisan }}</nowiki></code>
'''Result:''' {{#invoke:AnnotatedLink|main|name=The Partisan}}
This and the following example song titles should be double quoted per [[MOS:POPMUSIC]]; that will be handled by [[#quote]] (below).
=== display ===
Providing a value for {{para|display}} will format the piped link with a display string:
'''Markup:''' <code><nowiki>{{#invoke:AnnotatedLink|main |name=Jump (Every Little Thing song) |display=Jump }}</nowiki></code>
'''Result:''' {{#invoke:AnnotatedLink|main|name=Jump (Every Little Thing song)|display=Jump}}
=== quote ===
Stating {{para|quote|yes}} will double quote the link:
'''Markup:''' <code><nowiki>{{#invoke:AnnotatedLink|main |name=The Partisan |quote=yes }}</nowiki></code>
'''Result:''' {{#invoke:AnnotatedLink|main|name=The Partisan|quote=yes}}
'''Markup:''' <code><nowiki>{{#invoke:AnnotatedLink|main |name=Jump (Every Little Thing song) |display=Jump |quote=yes }}</nowiki></code>
'''Result:''' {{#invoke:AnnotatedLink|main|name=Jump (Every Little Thing song)|display=Jump|quote=yes}}
=== abbr ===
Providing a value for {{para|abbr}} will append the link with the provided parenthesized abbreviation:
'''Markup:''' <code><nowiki>{{#invoke:AnnotatedLink|main |name=Confédération Mondiale des Activités Subaquatiques |display=World Underwater Federation |abbr=CMAS }}</nowiki></code>
'''Result:''' {{#invoke:AnnotatedLink|main|name=Confédération Mondiale des Activités Subaquatiques|display=World Underwater Federation|abbr=CMAS}}
=== aka ===
Providing a value for {{para|aka}} will append the link (and the abbreviation if provided) with a useful alternative name:
'''Markup:''' <code><nowiki>{{#invoke:AnnotatedLink|main |name=The Partisan |quote=yes |aka=La Complainte du partisan }}</nowiki></code>
'''Result:''' {{#invoke:AnnotatedLink|main|name=The Partisan|quote=yes|aka=La Complainte du partisan}}
'''Markup:''' <code><nowiki>{{#invoke:AnnotatedLink|main |name=Confédération Mondiale des Activités Subaquatiques |display=World Underwater Federation |abbr=CMAS |aka=Confédération Mondiale des Activités Subaquatiques }}</nowiki></code>
'''Result:''' {{#invoke:AnnotatedLink|main|name=Confédération Mondiale des Activités Subaquatiques|display=World Underwater Federation|abbr=CMAS|aka=Confédération Mondiale des Activités Subaquatiques}}
These and some following examples contain foreign language text that, per [[MOS:OTHERLANG]], should be properly displayed and declared via [[HTML]] markup as being of that language; this will be handled by various parameters; see [[#Foreign language text]] (below).
=== wedge ===
=== dash ===
=== desc_first_letter_case ===
=== link_lang ===
{{para|link_lang}} ... {{para|link_lang_italic}}, {{para|link_lang_nocat}}, {{para|link_lang_size}}, {{para|link_lang_cat}}, {{para|link_lang_rtl}}
=== wedge_lang ===
{{para|wedge_lang_italic}}, {{para|wedge_lang_nocat}}, {{para|wedge_lang_size}}, {{para|wedge_lang_cat}}, {{para|wedge_lang_rtl}}
=== aka_lang ===
{{para|aka_lang_italic}}, {{para|aka_lang_nocat}}, {{para|aka_lang_size}}, {{para|aka_lang_cat}}, {{para|aka_lang_rtl}}
=== Module:GetShortDescription parameters ===
{{main|Module:GetShortDescription/doc}}
''' name '''
This parameter is passed through this module to Module:GetShortDescription where it is also '''required'''; the expectations are described in [[#name]] (above).
==== only ====
Stating {{para|only}} will limit the search to being only for the stated description. If no description is found, the result will be an empty string, unless a fallback is provided; see [[#Fallback]] (below).
''' explicit '''
''' wikidata '''
==== prefer ====
Stating {{para|prefer}} will initiate the search for the stated description, but try for the alternative if none is found. If no description is found, the result will be an empty string, unless a fallback is provided; see [[#Fallback]] (below).
''' explicit or wikidata '''
''' wikidata or explicit '''
==== fallback ====
If a {{para|fallback}} is provided, and no description is found by the expressed route, the result will be the stated fallback.
''' only or fallback '''
''' prefer or fallback '''
=== Foreign language text ===
Should a wikidata description be retrieved, which is declared (at the source) as being of a foreign language (i.e. not ''en''), the return will be wrapped in {{tlx|lang}} by default; this may be disabled with {{para|lang_no|yes}}.
The parameters for {{tlc|lang}} may be provided via: {{para|lang_italic}}, {{para|lang_nocat}}, {{para|lang_size}}, {{para|lang_cat}} and {{para|lang_rtl}}; see [[Template:Lang/doc|lang's documentation]] for details.
'''Markup:''' <code><nowiki>{{#invoke:AnnotatedLink|main |name=The Partisan |quote=yes |only=wikidata |desc_first_letter_case=upper |wedge=from the album ''[[Songs from a Room]]'' |aka=La Complainte du partisan |aka_lang=fr }}</nowiki></code>
'''Result:''' {{#invoke:AnnotatedLink|main |name=The Partisan |quote=yes |only=wikidata |desc_first_letter_case=upper |wedge=from the album ''[[Songs from a Room]]'' |aka=La Complainte du partisan |aka_lang=fr }}
|