![](http://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Test_Template_Info-Icon_-_Version_%282%29.svg/50px-Test_Template_Info-Icon_-_Version_%282%29.svg.png)
This template will retrieve certain data from Wikidata for use in a table in an article. It is a wrapper template for Module:Wikidata table function makerow, using predefined properties.
It was designed for use on List of castles in Ireland but may also be used on other articles. (Search)
Usage
The data that is displayed in each column is as follows:Column 1 | Column 2 | Column 3 | Column 4 | Column 5 | Column 6 |
---|---|---|---|---|---|
Label | image (P18) | location (P276) coordinate location (P625) | instance of (P31) | inception (P571) | Custom input |
Example
The Wikidata QID for Cloughoughter Castle is Q3752944. Typing the following:{{Wdtable row/castle|qid=Q3752944}}
Name | Image | Location | Instance of | Inception | Column 6 |
---|---|---|---|---|---|
Cloughoughter Castle ![]() | ![]() | Belturbet 54°0′44″N 7°27′59″W | Castle ruin | 1233[1] |
Notes
- The table caption, column headings, etc. need to be added manually.
- Please be careful about making changes to this template, as corresponding changes will need to be made to the column headings on List of castles in Ireland and any other article using it. (Search)
Overriding columns
It is possible to override or append to data values obtained from Wikidata in any column in the table.- To completely override column n with some custom content, use parameter
cn=
- For example, to replace column 5 with the number 1957 use
c5=1957
- For example, to replace column 5 with the number 1957 use
- To append some custom content to the end of column n use parameter
cn+=
- For example, to add a footnote to column 6 use
c6+={{efn|This value is approximate.}}
- For example, to add a footnote to column 6 use
Add named reference
If you define references in a list then you can cite one of these by using the parameterrefname
. This will add a reference to column 1 directly after the label.
For example you can define a reference called Smith1 by using {{reflist|refs= <ref name="Smith1">reference</ref> }}Then use
refname=Smith1
References
TemplateData
This template reads some data from Wikidata while also allowing an editor to override or append their own content.
Parameter | Description | Type | Status | |
---|---|---|---|---|
QID | qid | Enter the Wikidata QID, which is a number beginning with Q. You can also add the name of the item as an HTML comment.
| String | suggested |
Add named reference | refname | Add a named reference defined in a list
| String | optional |
Override label | c1 | Override the label (column 1) with this value | Content | optional |
Append to label | c1+ | Append this content to the label (column 1) | Content | optional |
Override image | c2 | Override the image (column 2) with this content | Content | optional |
Append to image | c2+ | Append this content to the image (column 2) | Content | optional |
Override location | c3 | Override the location (column 3) with this content | Content | optional |
Append to location | c3+ | Append this content to the location (column 3) | Content | optional |
Override instance of | c4 | Override the instance of (column 4) with this content | Content | optional |
Append to instance of | c4+ | Append this content to the instance of (column 4) | Content | optional |
Override inception | c5 | Override the inception (column 5) with this content | Content | optional |
Append to inception | c5+ | Append this content to the inception (column 5) | Content | optional |
Define column 6 | c6 | Define column 6 with this content | Content | optional |