Module:WikidataIB/sandbox1/doc: Difference between revisions

Content deleted Content added
document format parameter for global coordinates
cleanup; arbitrary access is no longer expensive
Line 11:
| (first unnamed)
| 1
| The property -ID whose values are returned. Required.
|
|-
Line 17:
| (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. DefaultsIf not supplied or empty, defaults to the associated Wikidata entry of the current page. This isuses not[[:mw:Extension:Wikibase normallyClient/Lua used, as it makes an ''expensive'' call#mw.wikibase.getEntityIdForCurrentPage|mw.wikibase.getEntityIdForCurrentPage()]].
| Item id for current page
| nil
|-
| rank
|
| When set to "<code>preferred"</code>, returns only preferred values if present, otherwise returns all. When set to "<code>normal"</code>, returns only normal values if present, otherwise returns all. Any parameter value beginning with "p" is "preferred". Any parameter value beginning with "n" is "normal".
| nil (all ranks)
|-
| qual
|
| The property-idID 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
|-
Line 47:
| 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
|-
Line 67:
| 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
|
| Determines how many values may 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)
|-
Line 107:
| 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
|-