<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FWas_a_bee%2FgetLinkedName%2Fdoc</id>
	<title>Module:Sandbox/Was a bee/getLinkedName/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FWas_a_bee%2FgetLinkedName%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Was_a_bee/getLinkedName/doc&amp;action=history"/>
	<updated>2026-04-10T13:47:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Sandbox/Was_a_bee/getLinkedName/doc&amp;diff=146386&amp;oldid=prev</id>
		<title>imported&gt;Was a bee: /* Parameters */</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Was_a_bee/getLinkedName/doc&amp;diff=146386&amp;oldid=prev"/>
		<updated>2018-06-05T22:04:35Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Parameters&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Module rating |alpha&amp;lt;!-- Values:  pre-alpha • alpha • beta • release • protected  --  If a rating not needed/relevant, delete this template call --&amp;gt;}}&lt;br /&gt;
&amp;lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --&amp;gt;&lt;br /&gt;
Retrieving text from Wikidata and formatting it in wiki-linked style. Algorithm of this module is as follows.&lt;br /&gt;
*Case 1. If there is sitelink, then use [[:d:Help:Sitelinks|sitelink]].&lt;br /&gt;
**Case 2 If sitelink has [[WP:DAB|disambiguation brackets]], then remove the brackets.&lt;br /&gt;
***Case 3. If there is no sitelink, then use [[:d:Help:Label|label]].&lt;br /&gt;
****Case 4. If there is no sitelink and label, then use [[:d:Help:Items|item ID]] (with editing pencil like this &amp;quot;[[File:Blue pencil.svg|frameless|text-top|10px|link=https://www.wikidata.org/wiki/Q42]]&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|QID}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
=== Case 1: Sitelink exists ===&lt;br /&gt;
;Input&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q42}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
;Output&lt;br /&gt;
{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q42}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Sitelink exists but which has disambiguation brackets ===&lt;br /&gt;
;Input&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q6258348}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
;Output&lt;br /&gt;
{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q6258348}}&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Sitelink doesn&amp;#039;t exist but label exists ===&lt;br /&gt;
;Input&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q23366230}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
;Output&lt;br /&gt;
{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q23366230}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Both sitelink and label doesn&amp;#039;t exist ===&lt;br /&gt;
;Input&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q11485627}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
;Output&lt;br /&gt;
{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q11485627}}&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
=== alias ===&lt;br /&gt;
{{Para|alias}} parameter specifies text shown as alias without changing the link target.&lt;br /&gt;
;Input&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q30}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q30|alias=US}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
;Output&lt;br /&gt;
{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q30}}&lt;br /&gt;
&lt;br /&gt;
{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q30|alias=US}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox | |&lt;br /&gt;
&amp;lt;!-- Categories below this line, please; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>imported&gt;Was a bee</name></author>
	</entry>
</feed>