Modifica di
Template:Wikidata/doc
(sezione)
Vai alla navigazione
Vai alla ricerca
Attenzione:
non hai effettuato l'accesso. Se effettuerai delle modifiche il tuo indirizzo IP sarà visibile pubblicamente. Se
accedi
o
crei un'utenza
, le tue modifiche saranno attribuite al tuo nome utente, insieme ad altri benefici.
Controllo anti-spam.
NON
riempirlo!
== Usage == The general structure of a call to this {{lcfirst:{{NAMESPACE}}}} is as follows. Note that the basic structure consists of positional commands, flags and arguments, which all have a fixed position. :{{tnull|{{{prename|}}}{{lcfirst:{{ROOTPAGENAME}}}}{{0| }}{{Background color|#cddae3|<nowiki>|command1|flag1a|flag1b|flag1c</nowiki>}}{{0| }}{{Background color|#dce5ec|<nowiki>|command2|flag2a|flag2b|flag2c</nowiki>}}{{0| }}{{Background color|#c1debf|<nowiki>|flag0a|flag0b|flag0c</nowiki>}}{{0| }}{{Background color|#ffdfc4|<nowiki>|arg1|arg2|arg3</nowiki>}}}} Use different [[#Commands|{{Background color|#cddae3|commands}}]] to get different kinds of values from Wikidata. At least one command must be given and multiple commands can be combined into one call as shown above (in any order, more than two is also possible), but this only applies to commands from the [[#Claim class|claim class]]; calls containing a command from the [[#General class|general class]] cannot contain any other command. Each command can be followed by any number of [[#Command flags|{{Background color|#cddae3|command flags}}]], which are optional and can be used to tweak the output generated by that command. The commands and their flags may be followed by any number of [[#Configuration flags|{{Background color|#c1debf|configuration flags}}]], which are also optional and affect the selection of data and the {{lcfirst:{{NAMESPACE}}}}'s behaviour in general. The call is closed with the [[#Positional arguments|{{Background color|#ffdfc4|positional arguments}}]], which may be required depending on the given command(s). Some [[#Named arguments|named arguments]] (i.e. name-value pairs) also exist, as well as a set of named flags for [[#Advanced usage|advanced usage]] that can be used to change the way the fetched values are merged together into the output. This {{lcfirst:{{NAMESPACE}}}} was designed to provide the basic needs for fetching data from Wikidata, but a lot can be achieved through different combinations of calls. For convenience, such combinations could be wrapped into new templates that serve a specific need. See also the section on [[#Common use cases|common use cases]] below for some examples of useful "building blocks". Likewise, the functionality of this {{lcfirst:{{NAMESPACE}}}} can be extended by creating wrapper templates that use the [[Module:Wd#Main class|<code>main</code> command]] provided by {{module other|this module|[[Module:Wd]] which is being used by this template}} (just like {{t|WikidataOI}} does). === Common use cases === Below follows a list of common use cases. In the future, shortcut commands may be implemented that are equivalent to these calls for convenience. {| class="wikitable" |- ! Call ! Use case |- | {{nowrap|{{tnull|{{{prename|}}}{{lcfirst:{{ROOTPAGENAME}}}}|label|raw|{{{extraparams|}}}}}}} | Returns the Q-identifier of the Wikidata item connected to the current page (e.g. "Q55"). |- | {{nowrap|<code><nowiki>{{#if:</nowiki>{{tnull|{{{prename|}}}{{lcfirst:{{ROOTPAGENAME}}}}|label|raw|{{{extraparams|}}}}}<nowiki>|...}}</nowiki></code>}} | Performs a check to determine if the current page has a Wikidata item. Note that this statement relies on a returned value that is either empty or non-empty and that the <code>raw</code> flag is important to include. Without this flag, an existing item's regular label would be returned which could be empty, giving an undesired result. If the flag is given on the other hand, then a non-empty Q-identifier is always returned if an item exists and an empty value if an item does not exist. |}
Oggetto:
Per favore tieni presente che tutti i contributi a Tematiche di genere si considerano pubblicati nei termini d'uso della licenza Creative Commons Attribuzione-Condividi allo stesso modo (vedi
Tematiche di genere:Copyright
per maggiori dettagli). Se non desideri che i tuoi testi possano essere modificati e ridistribuiti da chiunque senza alcuna limitazione, non inviarli qui.
Inviando il testo dichiari inoltre, sotto tua responsabilità, che è stato scritto da te personalmente oppure è stato copiato da una fonte di pubblico dominio o similarmente libera.
Non inviare materiale protetto da copyright senza autorizzazione!
Annulla
Guida
(si apre in una nuova finestra)
Menu di navigazione
Strumenti personali
Accesso non effettuato
discussioni
contributi
entra
Namespace
Template
Discussione
italiano
Visite
Leggi
Modifica sorgente
Cronologia
Altro
Navigazione
Pagina principale
Ultime modifiche
Categorie
Principali Categorie
Pagine orfane
Pagine prive di categorie
Semantic Ask
Una pagina a caso
Aiuto su MediaWiki
Modifica Sidebar
Strumenti
Puntano qui
Modifiche correlate
Carica un file
Pagine speciali
Informazioni pagina