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!
==== Modifying the returned items ==== Wikibase-items and plain text data types may be used with the parameters: * {{para|prefix}}, {{para|postfix}}, {{para|linkprefix}}, {{para|linkpostfix}} If you don't supply at least one of {{para|linkprefix}} or {{para|linkpostfix}}, then just {{para|prefix}} and {{para|postfix}} are used. For example, when getting the {{P|P717}} in {{Q|Q532127|}}: * <code><nowiki>{{#invoke:WikidataIB|getValue|P717|fetchwikidata=ALL|onlysourced=no |prefix="textbefore " |postfix=" textafter" |qid=Q532127}}</nowiki></code> → {{#invoke:WikidataIB |getValue |P717 |fetchwikidata=ALL|onlysourced=no |prefix="textbefore " |postfix=" textafter" |qid=Q532127}} Use double-quotes to enclose the parameter value if it has leading or trailing spaces (otherwise they are stripped out). If you supply {{para|linkprefix}} or {{para|linkpostfix}}, then all four parameters are used and a link is made for each value like this: * <code><nowiki>[[ linkprefix LinkValue1 linkpostfix | prefix PropertyValue1 postfix]], [[ linkprefix LinkValue2 linkpostfix | prefix PropertyValue2 postfix]], etc.</nowiki></code> That allows multiple links to be made to different sections of a list article, such as [[:en:List of observatory codes]]. For example, when getting the {{P|P717}} in {{Q|Q532127|}} we can make the links: *<code><nowiki>{{#invoke:WikidataIB|getValue|P717|fetchwikidata=ALL|onlysourced=no |prefix= |postfix= |linkprefix=":en:List of observatory codes#" |linkpostfix= |qid=Q532127}}</nowiki></code> → {{#invoke:WikidataIB|getValue|P717|fetchwikidata=ALL|onlysourced=no |prefix= |postfix= |linkprefix=":en:List of observatory codes#" |linkpostfix= |qid=Q532127}} This also finds use where we want to suppress categorisation and simply display a link to a category by using ":" as the linkprefix: * <code><nowiki>{{#invoke:WikidataIB |getValue |P26 |qid=Q151973 |fwd=ALL |osd=no |maxvals=1 |linkprefix=":"}}</nowiki></code> → {{#invoke:WikidataIB |getValue |P26 |qid=Q151973 |fwd=ALL |osd=no |maxvals=1 |linkprefix=":"}} Whereas <code><nowiki>{{#invoke:WikidataIB |getValue |P26 |qid=Q151973 |fwd=ALL |osd=no |maxvals=1}}</nowiki></code> would place the page in the [[:Category:Elizabeth Taylor]]
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