Tɛmplet:Wikidata list/doc: Waligimsim din be labiteei balibu ni.

Lahabali din nyahi Lahabali din pahi
No edit summary
some more links to SPARQL docs and slight additions here and there
Kuligu 5:
This template defines a bot-generated list based on Wikidata ([http://magnusmanske.de/wordpress/?p=301 original blog post]). It must be "closed" with {{tl|Wikidata list end}}; the text between these two templates will be periodically (once every 24h) replaced by the bot-generated list. At this moment, only one list per page is possible. Example:
<nowiki>{{</nowiki>'''{{BASEPAGENAME}}'''
|'''sparql'''=SELECT ?item WHERE {
?item wdt:P31 wd:Q39715 .
?item wdt:P131 ?sub0 . ?sub0item (wdt:P131)* wd:Q55 }
}
|'''wdq'''=claim[31:39715] and claim[131:(tree[55][][131])]
|'''columns'''=label:Article,description,p131:Place,P580,P582,p625,P18
|'''section'''=131
|'''min_section'''=3
|'''sort'''=label
|'''links'''=text
|'''columns'''=label:Article,description,p131:Place,P580,P582,p625,P18
|'''thumb'''=128
|'''min_sectionautolist'''=2fallback
|'''wdedit'''=yes
}}
... (This will be overwritten by ListeriaBot) ...
...
{{tl|Wikidata list end}}
 
Parameters:
;sparql:A [[:mw:Wikidata query service/User Manual#Basics - Understanding SPO (Subject, Predicate, Object) also known as a Semantic Triple|SPARQL ''SELECT'' query]]. Needs to return <code>?item</code> as the item number. You can use a [https://tools.wmflabs.org/wdq2sparql/w2s.php conversion tool] to convert WDQ to SPARQL, but always [https://query.wikidata.org/ check your query] to make sure it works. '''Mandatory''', unless WDQ is used. <br>Samples atSee [[mwd:WikibaseWikidata:SPARQL query service/Indexingqueries/SPARQL_Query_Examplesexamples#Listeria|SPARQL query service examples suitable for Listeria]]
;wdq:A [https://wdq.wmflabs.org WikiDataQuery] query string. The resulting items will be used to build the list. Try your query out [https://tools.wmflabs.org/autolist/ here]. '''Mandatory''', unless SPARQL is used.
;columns:Defines the columns of the list table. Allowed values are :
Line 36 ⟶ 41:
: ''Optional''
;section:The list can be sectioned by a Wikidata property. ''Optional''
;min_section:The minimum number of entries to generate a section when used together with <code>section</code>. All other entries will be put under section "misc". Default:2. ''Optional''
;autolist:If ''description'' is a column but no description exists on Wikidata, "autolist=fallback" uses [https://tools.wmflabs.org/autodesc/ AutoDesc] to generate one. ''Optional''
;language:Label/description language, if different from site language. ''Optional''
Line 48 ⟶ 53:
:* <code>reasonator</code> to generate blue links for existing pages, and links to [https://tools.wmflabs.org/reasonator/ Reasonator] otherwise.
:''Optional''
;row_template:Generates a template call rather than a table row; the template must then generate the table row in turn or the table header/footer need to be surpressed using <code>skip_table</code> parameter. Parameters passed to the template are the lower-case keys from the <code>columns</code> parameter, e.g. <code><nowiki>label</nowiki></code> or <code><nowiki>p18</nowiki></code>. ''Optional''
;skip_table:Suppresses the table markup completely when using <code>row_template</code>. Any value will work.
;wdedit:Generates information that allows Wikidata editing from Wikipedia using [https://www.wikidata.org/w/index.php?title=User:Magnus_Manske/wd_edit.js this JavaScript]. Value needs to be <ttcode>yes</ttcode>. Does not work when <code>row_template</code> is used. Caution: This will result in larger wikitext than normal, and updates may fail because of that. ''Optional''
;references:Add references. Allowed value is <ttcode>all</ttcode>. Requires {{tl|reflist}} or similar somewhere in the page. ''Optional''
;freq:Numerical value X; wait at least X days before an automatic update. Does not affect updates via web interface. ''Optional''
;summary:Comma-separated list of keys to add as a summary underneath all other content. ''Optional''