Template:List item
Article not recognised.
Usage
This template is used to create lists of items in tables (e.g. List of crossings of the Danube#Hungary) with the option to fetch some or all data from Wikidata.
It takes one named parameter |qid=
and an optional unnamed parameter, i.e. |1=
, |2=
, |3=
, etc. for each column of the table. Any data passed in the unnamed parameters is included in the corresponding column in the table. For example |1=[[Lloyd Spriggle Memorial Bridge]]
will define or override the content for column 1.
The following code would add content to 6 columns of a table on List of crossings of the Upper Mississippi River:
{{List item |1=[[Dubuque-Wisconsin Bridge]] |2=[[U.S. Route 61 in Iowa]] |3=[[Dubuque, Iowa]] |4=~581 |5={{coord|42|30|56|N|90|38|08|W}} |6=[[File:Mississippi_River_Dubuque-Wisconsin_Bridge.jpg|100px]] }}
which would produce (inside an existing table):
Crossing | Carries | Location | Miles above the Ohio | Coordinates | Photo |
---|---|---|---|---|---|
Article not recognised. |
Fetching data from Wikidata
Data will be obtained from Wikidata if the following conditions hold:
- A valid Wikidata qid is specified corresponding to the relevant item, e.g.
|qid=Q6772642
. - The Wikidata item holds data for the relevant column.
- The corresponding override parameter is not defined, e.g.
|3=
If Wikidata holds all relevant information, then a qid alone can be specified, e.g.
{{List item|qid=Q1263271}}
which produces:
Crossing | Carries | Location | Miles above the Ohio | Coordinates | Photo |
---|---|---|---|---|---|
Article not recognised. |
The pencil icon provides a convenient link to edit the information on Wikidata.
It is possible to override some (or all) of the information from Wikidata by using override parameters. The sixth column is overridden in the following example:
{{List item|qid=Q1263271 |6=[[File:Dubuque_Wisconsin_Bridge_heading_toward_Iowa.jpg|100px]] }}
which produces (on the relevant article):
Crossing | Carries | Location | Miles above the Ohio | Coordinates | Photo |
---|---|---|---|---|---|
Article not recognised. |
All the information is fetched from Wikidata except the sixth column which has been overridden.
Configuration
The table below shows the articles that currently use (or partly use) this template, and how each column in the tables are used.
Article | Article Qid | Column 1 | Column 2 | Column 3 | Column 4 | Column 5 | Column 6 | Column 7 | Column 8 | Column 9 |
---|---|---|---|---|---|---|---|---|---|---|
Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). | Q911165 | |||||||||
Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). | Q6614816 | |||||||||
Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). | Q475941 | |||||||||
Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). | Q4432620 | |||||||||
Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). | Q11892 | |||||||||
Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). | Q48791835 | |||||||||
Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). | Q216373 | |||||||||
Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). | Q27661638 | |||||||||
Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). | Q18127238 | |||||||||
Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). | Q920649 |
To change the configuration shown above, edit Module:Data/List config and change the corresponding row.
To use this template on a new article, not listed above add a new row to Module:Data/List config, in the following format:
Qnnnnnn = {c1="", c2="", c3="", c4="", c5="", c6=""},
where
- Qnnnnnn is the article's Qid (when on the article, click "wikidata item" in the sidebar and the Qid will be shown at the top)
- c1, c2, c3, etc. define what each column displays, and should be one of the fields defined below.
Fields
The formatting for each field is held in a subpage of Template:List item. The table below shows the currently recognised fields (linked to corresponding subpages) and the Wikidata property used for each.
You can see all subpages of this template: Special:PrefixIndex/Template:List item/
See also
The above documentation is transcluded from Template:List item/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |