<?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%3AWikidata_table%2Fdoc</id>
	<title>Module:Wikidata table/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%3AWikidata_table%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Wikidata_table/doc&amp;action=history"/>
	<updated>2026-05-12T02:57:23Z</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:Wikidata_table/doc&amp;diff=147712&amp;oldid=prev</id>
		<title>imported&gt;MSGJ: /* Usage */ move down</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Wikidata_table/doc&amp;diff=147712&amp;oldid=prev"/>
		<updated>2022-09-28T17:04:52Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Usage: &lt;/span&gt; move down&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&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;
This module creates one or more table rows where the data in each cell is taken from Wikidata.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Function makerow ===&lt;br /&gt;
This function is under development for use in articles.&lt;br /&gt;
It creates a single table row from one Wikidata entity using a given set of properties.&lt;br /&gt;
The first cell is the label for the Wikidata entity and it is marked up as a row-header. An &amp;quot;editonwikidata&amp;quot; icon is appended to the first cell.&lt;br /&gt;
The table caption, column headings and scopes, etc. should be supplied externally. See the examples for more detail.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;moin&amp;quot;&amp;gt;&lt;br /&gt;
{{#invoke:Wikidata table |makerow&lt;br /&gt;
	|pids= P123, P234+P345, P456, P567/P580-P582, etc. (see below)&lt;br /&gt;
	|qid = Q12345 (one entity id for the row)&lt;br /&gt;
    |line = HTML color code for horizontal line applied to top of each row (if required)&lt;br /&gt;
	|c1 = locally supplied value (overrides value from Wikidata for column 1)&lt;br /&gt;
	|c2 = locally supplied value (overrides value from Wikidata for column 2)&lt;br /&gt;
	|cN = locally supplied value (overrides value from Wikidata for column N), etc.&lt;br /&gt;
	|c1+ = locally supplied value (appends value from Wikidata to column 1)&lt;br /&gt;
	|c2+ = locally supplied value (appends value from Wikidata to column 2)&lt;br /&gt;
	|cN+ = locally supplied value (appends value from Wikidata to column N), etc.&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== Notes===&lt;br /&gt;
* A table cell can be made up of a combination of multiple properties, qualifiers and references.&lt;br /&gt;
* Whitespace is ignored in the list of pids.&lt;br /&gt;
* The separator for cell values is the comma &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Within a cell, multiple properties are separated by the plus sign &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Each property can be separated from one or more qualifiers by a forward-slash &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Each qualifier is separated by a hyphen &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; (although any punctuation other than &amp;lt;code&amp;gt;, + /&amp;lt;/code&amp;gt; will work).&lt;br /&gt;
&lt;br /&gt;
=== Function convert ===&lt;br /&gt;
A convenient function to convert a list of articles into a table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;moin&amp;quot;&amp;gt;&lt;br /&gt;
{{subst:#invoke:Wikidata table | convert&lt;br /&gt;
    | template = name of template&lt;br /&gt;
    | 1 = list of articles&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;moin&amp;quot;&amp;gt;&lt;br /&gt;
{{subst:#invoke:Wikidata table | convert | template = Wdtable row/dam | 1 =&lt;br /&gt;
* [[Aoyama Dam]]&lt;br /&gt;
* [[Apporo Dam]]&lt;br /&gt;
* [[Ariake Dam]]&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
produces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{Wdtable row/dam|qid=Q113189811&amp;lt;!-- Aoyama Dam --&amp;gt;}}&lt;br /&gt;
{{Wdtable row/dam|qid=Q113189827&amp;lt;!-- Apporo Dam --&amp;gt;}}&lt;br /&gt;
{{Wdtable row/dam|qid=Q113189802&amp;lt;!-- Ariake Dam --&amp;gt;}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Function makerows ===&lt;br /&gt;
This function is simple and is intended to test performance. It is unsuitable for use in articles.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;moin&amp;quot;&amp;gt;&lt;br /&gt;
{{#invoke:Wikidata table |makerows&lt;br /&gt;
	|pids= P123, P234, P345, etc. (one property id per column)&lt;br /&gt;
	|qids = Q12345, Q23456, Q34567, etc. (one entity id per row)&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Template:Wdtable row]] – a wrapper template for &amp;lt;code&amp;gt;makerow&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[Template:Wdtable row/lighthouse]] – a custom wrapper template for &amp;lt;code&amp;gt;makerow&amp;lt;/code&amp;gt;, hard-coding the pids for lists of lighthouses&lt;br /&gt;
* [[Module talk:Wikidata table]] – testing/examples for &amp;lt;code&amp;gt;makerow&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[Template:Wikidata list]] – bot generates Wikidata tables&lt;br /&gt;
* [[Module:Tabular data]] – shows tabular data from Commons&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;
[[Category:Wikidata modules]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>imported&gt;MSGJ</name></author>
	</entry>
</feed>