Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:WikidataIB/sandbox1/doc
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Parameters to getValue === {| class ="wikitable" |- ! scope="col" | Name ! scope="col" | Alias ! scope="col" | Function ! scope="col" | 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:Extension:Wikibase Client/Lua #mw.wikibase.getEntityIdForCurrentPage|mw.wikibase.getEntityIdForCurrentPage()]]. | Item id for current page |- | rank | | [Case insensitive] When set to <code>best</code>, returns preferred values if present, otherwise returns normal values. When set to <code>preferred</code> returns preferred values. When set to <code>normal</code>, returns normal values. When set to <code>deprecated</code> 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 <code>qual=ALL</code> returns all qualifiers. Setting <code>qual=DATES</code> returns {{q|P580}} and {{q|P582}} with a date separator. | none |- | fetchwikidata | fwd | List of fields to fetch values from. <code>ALL</code> fetches all fields. A value of <code>NONE</code> 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 <code>fetchwikidata=ALL</code>). | nil |- | onlysourced | osd | A boolean which will filter out Wikidata values that are unsourced or only sourced to Wikipedia. Values <code>no</code>, <code>false</code> and <code>0</code> are all false; anything else is true. | true |- | df | | Date format: may be <code>dmy</code> (day before month) or <code>mdy</code> (month before day) or <code>y</code> (year alone). | dmy |- | bc | | Format of the BC/BCE suffix for dates. | BCE |- | linked | | A boolean that enables the link to a local page via its sitelink on Wikidata. Values <code>no</code>, <code>false</code> and <code>0</code> 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 <code>no</code>, <code>false</code> and <code>0</code> are all false; anything else is true. | false |- | unitabbr | | A boolean that enables unit abbreviations for common units. Values <code>no</code>, <code>false</code> and <code>0</code> 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 <code>0</code> and empty return all values. | 0 (all) |- | collapse | | Sets the maximum number of values to be returned before the content is auto-collapsed. Values <code>0</code> 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 <code>no</code>, <code>false</code> and <code>0</code> are all false; anything else is true. | false |- | qsorted | | A boolean which enables sorting of the qualifier values within each item returned. Values <code>no</code>, <code>false</code> and <code>0</code> 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 <code>no</code>, <code>false</code> and <code>0</code> 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 <code>longitude, latitude</code>. Any other value beginning "lon" (case insensitive) will return just longitude. Any value beginning "lat" (case insensitive) will return just latitude. When used with {{para|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 |}
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)