请输入您要查询的百科知识:

 

词条 Module:Sandbox/Was a bee/getLinkedName/doc
释义

  1. Usage

  2. Examples

      Case 1: Sitelink exists    Case 2: Sitelink exists but which has disambiguation brackets    Case 3: Sitelink doesn't exist but label exists    Case 4: Both sitelink and label doesn't exist  

  3. Parameters

      alias  
{{Module rating |alpha}}

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.
    • Case 3. If there is no sitelink, then use label.
    • Case 4. If there is no sitelink and label, then use item ID (with editing pencil like this "").

Usage

{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|QID}}

Examples

Case 1: Sitelink exists

Input
{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q42}}
Output
{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q42}}

Case 2: Sitelink exists but which has disambiguation brackets

Input
{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q6258348}}
Output
{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q6258348}}

Case 3: Sitelink doesn't exist but label exists

Input
{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q23366230}}
Output
{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q23366230}}

Case 4: Both sitelink and label doesn't exist

Input
{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q11485627}}
Output
{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q11485627}}

Parameters

alias

{{Para|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
{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q30}}{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q30|alias=US}}

{{#ifeq:{{SUBPAGENAME}}|sandbox | |

}}

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/20 12:27:25