Module:WikidataIB/sandbox/උපදෙස්
For documenting developments not yet in the main module.
Name | Alias | Function | Default |
---|---|---|---|
(first unnamed) | 1 | The property-ID whose values are returned. Required. | |
(second unnamed) | 2 | A locally supplied value that, if it is not empty, will be returned in preference to the value on Wikidata. | empty |
qid | The Q-number (entity-ID) of the entity that the property belongs to. If not supplied or empty, defaults to the associated Wikidata entry of the current page – uses mw.wikibase.getEntityIdForCurrentPage(). | Item id for current page | |
rank | [Case insensitive] When set to best , returns preferred values if present, otherwise returns normal values. When set to preferred returns preferred values. When set to normal , returns normal values. When set to deprecated returns deprecated values. Any parameter value beginning with "b" is "best"; beginning with "p" is "preferred"; beginning with "n" is "normal"; beginning with "d" is deprecated. Multiple values are allowed: "p n d" would return all ranks. "Best" overrides the other flags. Other values are ignored and if no ranks are requested, preferred and normal are returned.
|
preferred and normal | |
qual | The property-ID of a qualifier that is to be returned in parentheses after the property. Setting qual=ALL returns all qualifiers. Setting qual=DATES returns [[d:Property:P580|ආරම්භ වූ දිනය (P580)]] and [[d:Property:P582|end time (P582)]] with a date separator.
|
none | |
fetchwikidata | fwd | List of fields to fetch values from. ALL fetches all fields. A value of NONE or blank or omitting the parameter fetches no fields.
|
none |
suppressfields | spf | List of fields which will never display. This will even force a local value in the field not to display. | none |
name | Name of the field. When encoding an infobox, this is the name that fetchwikidata and suppressfields will recognise. Required if fetchwikidata or suppressfields is specified (except when fetchwikidata=ALL ).
|
nil | |
onlysourced | osd | A boolean which will filter out Wikidata values that are unsourced or only sourced to Wikipedia. Values no , false and 0 are all false; anything else is true.
|
true |
df | Date format: may be dmy (day before month) or mdy (month before day) or y (year alone).
|
dmy | |
bc | Format of the BC/BCE suffix for dates. | BC | |
linked | A boolean that enables the link to a local page via its sitelink on Wikidata. Values no , false and 0 are all false; anything else is true.
|
true | |
wdlinks | wdl | A boolean that enables the display of links to Wikidata when no local article exists. Values no , false and 0 are all false; anything else is true.
|
false |
unitabbr | A boolean that enables unit abbreviations for common units. Values no , false and 0 are all false; anything else is true.
|
false | |
maxvals | Sets the maximum number of values to be returned when multiple values are available. Setting it to 1 is useful where the returned string is used within another call, e.g. image. Values 0 and empty return all values.
|
0 (all) | |
collapse | Sets the maximum number of values to be returned before the content is auto-collapsed. Values 0 and empty allow all content to be displayed uncollapsed.
|
0 (all) | |
linkprefix | A link prefix that is prepended to the linked value when linked. Applies only to items that have articles and to strings (e.g. url). It triggers linking of strings. Any double-quotes " are stripped out, so that spaces may be passed. | empty | |
linkpostfix | A link postfix that is appended to the linked value when linked. Applies only to items that have articles and to strings (e.g. url). It triggers linking of strings. Any double-quotes " are stripped out, so that spaces may be passed. | empty | |
prefix | A prefix that is prepended to the displayed value of strings (e.g. url). Any double-quotes " are stripped out, so that spaces may be passed. | empty | |
postfix | A postfix that is appended to the displayed value of strings (e.g. url). Any double-quotes " are stripped out, so that spaces may be passed. | empty | |
qlinkprefix | Qualifier link prefix (see linkprefix). | empty | |
qlinkpostfix | Qualifier link postfix (see linkpostfix). | empty | |
qprefix | Qualifier prefix (see prefix). | empty | |
qpostfix | Qualifier postfix (see postfix). | empty | |
sorted | A boolean which enables sorting of the values returned. Values no , false and 0 are all false; anything else is true.
|
false | |
qsorted | A boolean which enables sorting of the qualifier values within each item returned. Values no , false and 0 are all false; anything else is true.
|
false | |
noicon | A boolean which will suppress the trailing "edit at Wikidata" pen-icon. Useful for when the returned value is to be further processed. Values no , false and 0 are all false; anything else is true.
|
false | |
list | The name of a template that the list of multiple values is then passed through. Examples include "hlist" and "ubl". Setting it to "prose" produces something like "1, 2, 3, and 4" | none | |
sep | Customises the string that is used to separate multiple returned values. Any double-quotes " are stripped out, so that spaces may be passed. If nothing or an empty string is passed it is set to the default list separator (", " in English). | ", " | |
qsep | Customises the string that is used to separate multiple returned qualifier values. Any double-quotes " are stripped out, so that spaces may be passed. If nothing or an empty string is passed it is set to the default list separator (", " in English). | ", " | |
format | Determines whether global coordinates should be rendered as degree/minute/second or as decimal degrees. Any value beginning "dec" (case insensitive) will render as decimal. Anything else will render as DMS. | dms | |
show | Determines how global coordinates should be returned. The value "longlat" will return longitude, latitude . Any other value beginning "lon" (case insensitive) will return just longitude. Any value beginning "lat" (case insensitive) will return just latitude. When used with |noicon=true , all of these will be pure numbers in decimal degrees (signed: N and E as positive), which are intended for use in mapping templates, etc. Anything other value (or nothing) will render the usual coordinate values as DMS or decimal with "NSEW" qualifiers, etc.
|
empty | |
lang | Allows an unlinked value to be returned in the chosen language. Takes a standard ISO language code recognised by MediaWiki. If not supplied or blank, the local language (or set language for multi-lingual wikis) is used as normal. | local language |