Mòdul:Wikidades/ús/en: diferència entre les revisions

Contingut suprimit Contingut afegit
→‎Parameters for formatting: durationm:s, numformat
→‎Function getParentValues: multiple values for uptolabelid
Línia 182:
== Function getParentValues ==
Returns recursively values of a property labeled with a parent value.
* <code>item=</code> (optional) Specifies an item (Qid) other than the associated to current page. Use it with moderation, as arbitrary access to Wikidata is expensive.
* <code>property=</code> (optional) Property id of the statement (Pid). By default it is {{P|131}}. Supports a list of alternative values ​​with any separator.
* <code>label=</code> (optional) Parent property id to use as label. By default, it is {{P|31}}.
* <code>uptolabelid=</code> (optional) Last iteration to fetch, using Qid, if previously there is not any 'property' not found. It supports multiple values ​​with any separator.
* <code>upto=</code> (optional) Quantity value of maximum number of iterations. By default it is 10 as a protection, large enough for common cases.
** upto=''label'' (deprecated): Alternative to <code>uptolabelid</code> using a label value, for example "upto=country".
Línia 193:
* <code>include_self=true</code> (optional) Includes current page on the output list.
* <code>sorting=-1</code> (optional) Sorts the list of paired values in descending order.
* <code>last_only=true</code> (optional) Only shows the last value fetched. For example, with uptolinkid=Qid and last_only=true it will show the value corresponding to label Qid.
* <code>formatting=</code> (optional) Format for the property value. By default it is a piped link to local page or Wikidata (see above [[#Parameters for formatting|formatting]] for data value entity).
* <code>valuetext=</code> (optional) Property to use as link label with 'property' value as link target.
* <code>labelformat=</code> (optional) Format for the label. By default, it is "label" (see above [[#Parameters for formatting|formatting]] for data value entity).
* <code>rowformat=</code> (optional) Output format for each pair of values, with placeholder $0 for the label and $1 for the value. By default it is "rowformat=$0 = $1", for example "country = <nowiki>[[France]]</nowiki>"
* <code>separator=</code> (optional) Separator for each pair of label-value, by default <nowiki><br /></nowiki>.