Redigerer
Modul:WikidataIB/dok
(avsnitt)
Hopp til navigering
Hopp til søk
Advarsel:
Du er ikke innlogget. IP-adressen din vil bli vist offentlig om du redigerer. Hvis du
logger inn
eller
oppretter en konto
vil redigeringene dine tilskrives brukernavnet ditt, og du vil få flere andre fordeler.
Antispamsjekk.
Ikke
fyll inn dette feltet!
=== 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 |- | eid | | An alternative to qid. Except for <code>eid</code>, all parameters to getValue treat nil and the empty string the same. So, setting {{para|x}} gives the same result as omitting the parameter. However, to provide some compatibility with other modules, using {{para|eid}} always returns an empty string, while omitting <code>eid</code> allows <code>qid</code> to work as normal. | 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 | | A punctuation-separated list of property-IDs of qualifiers that are to be returned in parentheses after the property. Setting <code>qual=ALL</code> returns all qualifiers. Setting <code>qual=DATES</code> returns {{p|P580}} and {{p|P582}} with a date separator. | none |- | qualsonly | qo | A boolean which enables the display of just the qualifier(s), without the property value or parentheses. Values <code>no</code>, <code>false</code> and <code>0</code> are all false; anything else is true. | false |- | 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 |- | qdf | | Date format of qualifiers. If omitted, defaults to parameter <code>df</code>, or "y" if <code>df</code> is also omitted. | value of df or "y" |- | bc | | Format of the BC/BCE suffix for dates. | BCE |- | plaindate | pd | String to modify formatting of dates. Setting "true"/"yes"/"1" disables adding "sourcing cirumstances" (P1480) and any links. Setting "adj" does the same but uses the adjectival form of the date. | false |- | 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 |- | displaytext | dt | A string that overrides the displayed text of a linked item if it is non-empty. | empty |- | shortname | sn | A boolean that enables the use of shortname (P1813) instead of label for a linked item. Values <code>no</code>, <code>false</code> and <code>0</code> are all false; anything else is true. | false |- | 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 |- | convert | conv | A boolean that enables passing of quantities to Template:Cvt. Values <code>no</code>, <code>false</code> and <code>0</code> are all false; anything else is true. | false |- | showunits | su | A boolean that enables showing units for quantities. Values <code>no</code>, <code>false</code> and <code>0</code> are all false; anything else is true. | true |- | scale | | A string that sets scaling for format of quantities. Values are: "a"=automatic; "0"=no scaling; "3"=thousand; "6"=million; "9"=billion; "12"=trillion. | 0 |- | 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 | lp | 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 | qlp | 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 |- | parameterset | ps | Convenience parameter to allow commonly used sets of parameters to be specified with a single parameter: ps=1 gets a simple linked value wherever possible; ps=2 represents a plain text value. See [[#Parameter sets|Parameter sets]] | |}
Redigeringsforklaring:
Merk at alle bidrag til Wikisida.no anses som frigitt under Creative Commons Navngivelse-IkkeKommersiell-DelPåSammeVilkår (se
Wikisida.no:Opphavsrett
for detaljer). Om du ikke vil at ditt materiale skal kunne redigeres og distribueres fritt må du ikke lagre det her.
Du lover oss også at du har skrevet teksten selv, eller kopiert den fra en kilde i offentlig eie eller en annen fri ressurs.
Ikke lagre opphavsrettsbeskyttet materiale uten tillatelse!
Avbryt
Redigeringshjelp
(åpnes i et nytt vindu)
Navigasjonsmeny
Personlige verktøy
Ikke logget inn
Brukerdiskusjon
Bidrag
Opprett konto
Logg inn
Navnerom
Modul
Diskusjon
norsk bokmål
Visninger
Les
Rediger kilde
Vis historikk
Mer
Søk
Navigasjon
Forside
Siste endringer
Tilfeldig side
Hjelp til MediaWiki
Spesialsider
Verktøy
Lenker hit
Relaterte endringer
Sideinformasjon
På andre prosjekter