Module:GetShortDescription/doc
It may contain usage information, categories and other content that is not part of the original module page.
Usage
{{#invoke:User:Fred Gandt/getShortDescription|main |name= |only= |prefer= |fallback= |lang_italic= |lang_nocat= |lang_size= |lang_cat= |lang_rtl= }}
Name
By providing only the required page name (including namespace), the module will look for an explicit {{short description}} in that page, but if not found, will try to fetch the wikidata description. If neither are found, the result will be an empty string.
If the result is a wikidata description, and it is declared as being non-English (en), the result will be wrapped in {{lang}}; see #Non-English wikidata descriptions (below).
This is equivalent to stating |prefer=explicit; see #Prefer (below).
Code: {{#invoke:User:Fred Gandt/getShortDescription|main |name=Example }}
Result: Script error: No such module "User:Fred Gandt/getShortDescription".
Only
Stating |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 or nothing
Code: {{#invoke:User:Fred Gandt/getShortDescription|main |name=Example |only=explicit }}
Result: Script error: No such module "User:Fred Gandt/getShortDescription".
Wikidata or nothing
Code: {{#invoke:User:Fred Gandt/getShortDescription|main |name=Example |only=wikidata }}
Result: Script error: No such module "User:Fred Gandt/getShortDescription".
Prefer
Stating |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 or nothing
Code: {{#invoke:User:Fred Gandt/getShortDescription|main |name=Example |prefer=explicit }}
Result: Script error: No such module "User:Fred Gandt/getShortDescription".
Wikidata or explicit or nothing
Code: {{#invoke:User:Fred Gandt/getShortDescription|main |name=Example |prefer=wikidata }}
Result: Script error: No such module "User:Fred Gandt/getShortDescription".
Fallback
If a |fallback= is provided, and no description is found by the expressed route, the result will be the stated fallback.
Only or fallback
Code: {{#invoke:User:Fred Gandt/getShortDescription|main |name=Example |only=explicit |fallback=This is a fallback }}
Result: Script error: No such module "User:Fred Gandt/getShortDescription".
Prefer or fallback
Code: {{#invoke:User:Fred Gandt/getShortDescription|main |name=Example |prefer=wikidata |fallback=This is a fallback }}
Result: Script error: No such module "User:Fred Gandt/getShortDescription".
Non-English wikidata descriptions
Should a wikidata description be retrieved, which is declared as being non-English (en), the return will be wrapped in {{lang}}.
The parameters for {{lang}} may be provided via: |lang_italic=, |lang_nocat=, |lang_size=, |lang_cat= and |lang_rtl=.