![]() | This is a documentation subpage for Module:Sandbox/Was a bee/getLinkedName. It may contain usage information, categories and other content that is not part of the original module page. |
Retrieving text from Wikidata and formatting it in wiki-linked style. Algorithm of this module is as follows.
- Case 1. If there is sitelink, then use sitelink.
- Case 2 If sitelink has disambiguation brackets, then remove the brackets.
Usage
edit{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|QID}}
Examples
editCase 1: Sitelink exists
edit- Input
{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q42}}
- Output
Case 2: Sitelink exists but which has disambiguation brackets
edit- Input
{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q6258348}}
- Output
Case 3: Sitelink doesn't exist but label exists
edit- Input
{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q23366230}}
- Output
Case 4: Both sitelink and label doesn't exist
edit- Input
{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q11485627}}
- Output
Parameters
editalias
edit|alias=
parameter specifies text shown as alias without changing the link target.
- Input
{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q30}}
{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q30|alias=US}}
- Output