Redigerer
Mal:Wikidata/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!
== Commands == The commands (<code>{{Background color|#cddae3|command1}}</code>, <code>{{Background color|#dce5ec|command2}}</code>, ...) determine what kind of values are returned. One call can only contain commands from a single class. === Claim class === The claim class commands can be combined, meaning that multiple commands of different types from this class can be given at one time ([[#Usage|see above for usage]]). Combine multiple commands into one call to this {{lcfirst:{{NAMESPACE}}}}, instead of making multiple calls to this {{lcfirst:{{NAMESPACE}}}} with one command each, to be sure that all the returned pieces of information belong to each other ([[#Examples|see also the examples below]]). {| class="wikitable" |- ! Type ! Command ! Returns ! Basic usage ! Description |- | rowspan="2" style="text-align:right;" | I ! style="text-align:left;" | <code>property</code> | <small>first match{{efn|Returns only a single value instead of multiple (if multiple claims or statements match). The returned value is the first match found from the best-ranked claims.}}</small> | {{nowrap|{{tnull|{{{prename|}}}{{lcfirst:{{ROOTPAGENAME}}}}|property|P1|{{{extraparams|}}}}}}} | rowspan="2" | Returns the requested property – or list of properties – from the current item-entity or from a given entity. This command can be given only once in one call. |- ! style="text-align:left;" | <code>properties</code> | <small>all matches</small> | {{nowrap|{{tnull|{{{prename|}}}{{lcfirst:{{ROOTPAGENAME}}}}|properties|P1|{{{extraparams|}}}}}}} |- | colspan="5" | |- | rowspan="2" style="text-align:right;" | II ! style="text-align:left;" | <code>qualifier</code> | <small>first match{{efn|Returns only a single value instead of multiple for each matching claim. To get at most one value in total in case the <code>property</code> command is not also used, additionally use the [[#Configuration flags|<code>single</code> configuration flag]].|name=fm}}</small> | {{nowrap|{{tnull|{{{prename|}}}{{lcfirst:{{ROOTPAGENAME}}}}|qualifier|P1|P2|{{{extraparams|}}}}}}} | rowspan="2" | Returns the requested qualifier – or list of qualifiers – from the given property of the current item-entity or of a given entity. Unlike the other claim class commands, this command can be given multiple times to retrieve different qualifiers in one call. |- ! style="text-align:left;" | <code>qualifiers</code> | <small>all matches</small> | {{nowrap|{{tnull|{{{prename|}}}{{lcfirst:{{ROOTPAGENAME}}}}|qualifiers|P1|P2|{{{extraparams|}}}}}}} |- | colspan="5" | |- | rowspan="2" style="text-align:right;" | III ! style="text-align:left;" | <code>reference</code> | <small>first match{{efn|name=fm}}</small> | {{nowrap|{{tnull|{{{prename|}}}{{lcfirst:{{ROOTPAGENAME}}}}|reference|P1|{{{extraparams|}}}}}}} | rowspan="2" | Returns a reference – or list of references – from the given property of the current item-entity or of a given entity.{{efn|Only references that are valid according to the [[d:Help:Sources|Wikidata guideline on sources]] are returned (i.e. those that have at least a property {{wpl|P248}} or {{wpl|P854}}).}} This command can be given only once in one call. |- ! style="text-align:left;" | <code>references</code> | <small>all matches</small> | {{nowrap|{{tnull|{{{prename|}}}{{lcfirst:{{ROOTPAGENAME}}}}|references|P1|{{{extraparams|}}}}}}} |- | colspan="5" | |- | colspan="5" style="text-align:left;" | {{notelist}} |} === General class === The general class commands cannot be combined. {| class="wikitable" |- ! Type ! Command ! Returns ! Basic usage ! Description |- | style="text-align:right;" | I ! style="text-align:left;" | <code>label</code> | | {{nowrap|{{tnull|{{{prename|}}}{{lcfirst:{{ROOTPAGENAME}}}}|label|{{{extraparams|}}}}}}} | Returns the label of the current item-entity or of a given entity if present. |- | colspan="5" | |- | style="text-align:right;" | II ! style="text-align:left;" | <code>title</code> | | {{nowrap|{{tnull|{{{prename|}}}{{lcfirst:{{ROOTPAGENAME}}}}|title|{{{extraparams|}}}}}}} | Returns the title of the page connected to the current item-entity or to a given item-entity if such page exists. |- | colspan="5" | |- | style="text-align:right;" | III ! style="text-align:left;" | <code>description</code> | | {{nowrap|{{tnull|{{{prename|}}}{{lcfirst:{{ROOTPAGENAME}}}}|description|{{{extraparams|}}}}}}} | Returns the description of the current item-entity or of a given entity if present. |- |- | colspan="5" | |- | rowspan="2" style="text-align:right;" | IV ! style="text-align:left;" | <code>alias</code> | <small>first match{{efn|Returns only a single value instead of multiple (if multiple values are present).|name=fmg}}</small> | {{nowrap|{{tnull|{{{prename|}}}{{lcfirst:{{ROOTPAGENAME}}}}|alias|{{{extraparams|}}}}}}} | rowspan="2" | Returns an alias – or list of aliases – of the current item-entity or of a given entity if present. |- ! style="text-align:left;" | <code>aliases</code> | <small>all matches</small> | {{nowrap|{{tnull|{{{prename|}}}{{lcfirst:{{ROOTPAGENAME}}}}|aliases|{{{extraparams|}}}}}}} |- | colspan="5" | |- | rowspan="2" style="text-align:right;" | V ! style="text-align:left;" | <code>badge</code> | <small>first match{{efn|name=fmg}}</small> | {{nowrap|{{tnull|{{{prename|}}}{{lcfirst:{{ROOTPAGENAME}}}}|badge|{{{extraparams|}}}}}}} | rowspan="2" | Returns a badge – or list of badges – for the page connected to the current item-entity or to a given item-entity if such page exists. |- ! style="text-align:left;" | <code>badges</code> | <small>all matches</small> | {{nowrap|{{tnull|{{{prename|}}}{{lcfirst:{{ROOTPAGENAME}}}}|badges|{{{extraparams|}}}}}}} |- | colspan="5" | |- | colspan="5" style="text-align:left;" | {{notelist}} |} {{{section|}}}
Redigeringsforklaring:
Merk at alle bidrag til Wikisida.no anses som frigitt under Creative Commons Navngivelse-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)
Forhåndsvis en side som bruker denne malen
Navigasjonsmeny
Personlige verktøy
Ikke logget inn
Brukerdiskusjon
Bidrag
Opprett konto
Logg inn
Navnerom
Mal
Diskusjon
norsk bokmål
Visninger
Les
Rediger kilde
Vis historikk
Mer
Navigasjon
Forside
Siste endringer
Tilfeldig side
Hjelp til MediaWiki
Verktøy
Lenker hit
Relaterte endringer
Spesialsider
Sideinformasjon