# வார்ப்புரு:Wikidata list/doc



## NOT IN MAINSPACE
Per , this template (or anything similar) should NOT be used in the mainspace at the moment.  

## Usage

This template defines a bot-generated list based on Wikidata (original blog post). It must be "closed" with ; 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.  

The query **MUST** include the <code>?item</code> variable - do not rename it.  

Example:  

... (This will be overwritten by ListeriaBot) ...  

Parameters:  
;sparql:A SPARQL *SELECT* query. Needs to return <code>?item</code> as the item number. **Mandatory**.  
See SPARQL query service examples suitable for Listeria  
;columns:Defines the columns of the list table. Allowed values are :  
:* <code>number</code>, a serial row number (per section), increasing from 1, according to the initial sorting  
:* <code>label</code>, the wiki-language-based label of the item, linked to the local article (where exists), or the Wikidata item  
:* <code>label/de</code>, the wiki-language-based label of the item, using the given language (here, "de"), as plain text  
:* <code>description</code>, the manual, or auto-generated description  
:* <code>item</code>, the Q item number  
:* <code>Pxxx</code> a Wikidata property  
:* <code>Pxxx/Pzzz</code>, qualifier properties; for Pxxx linking to an item Qyyy and having a Pzzz qualifier, the Qxxx linked label and the value of Pzzz  
:* <code>Pxxx/Qyyy/Pzzz</code>, qualifier properties; for Pxxx linking to an item Qyyy and having a Pzzz qualifier, the value of Pzzz. This is a version of the above, specific for a single item; e.g., "p553/q866/p554" to get YouTube account names.  
:* <code>?fieldname</code>, a SPARQL result field name.  
:Values marked as "deprecated" are not shown. Every column can optionally have a title generation by adding ":TITLE", otherwise the Wikidata property name is used. **Mandatory**  
;sort:The initial sort key for the table. Valid values are:  
:* <code>label</code>, the label of the item  
:* <code>family_name</code>, tries to find, and sort by, the family (last) name from the label, assuming items are people. This is a heuristic and may not work properly in all cases. If possible, try to sort by P734 (family name).  
:* <code>Pxxx</code>, a Wikidata property  
: *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 AutoDesc to generate one. *Optional*  
;language:Label/description language, if different from site language. *Optional*  
;:The width for images (e.g. column P18). Default:128. *Optional*  
;links:How to render links not in the local Wikipedia. Valid values are:  
:* <code>all</code> to link to Wikidata. Default.  
:* <code>local</code> to remove entries for which there exists no local article (the opposite of <code>red_only</code>).  
:* <code>red</code> to generate red links based on label and item.  
:* <code>red_only</code> to remove entries for which there exists a local article (the opposite of <code>local</code>).  
:* <code>text</code> to generate blue links for existing pages, and plain text otherwise.  
:* <code>reasonator</code> to generate blue links for existing pages, and links to 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 suppressed 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></code> or <code></code>. *Optional*  
;header_template:Generates a template call rather than a table header; the template must then generate the table header. No parameters are passed to this template. Recommended to be used with <code>row_template</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 this JavaScript. Value needs to be <code>yes</code>. 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 <code>all</code>. Requires 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*  
:* <code>itemnumber</code> The total number of items (rows) in this list.  

<includeonly></includeonly>