Template:Cite Q/doc

From Wikiversity

Usage[edit]

A wrapper for {{Citation}}, which calls available values from Wikidata.

An example of an article using this template for all of its references is South Pole Telescope; an example using Harvard style citations is Suffix automaton.

By default, if there are more than eight author names, the template displays three, followed by "et al". This can be changed using |display-authors=; using that parameter with no value displays them all. The same applies to multiple editors - see the test-case pages.

Future developments[edit]

  • Once robust the functionality should be merged into {{Citation}}
  • Eventually, each signed-in reader should be able to set, under their "Preferences", the style in which they wish to see citations rendered. No more CiteVar wars!
  • We should have a [[:mediawiki:|Global templates|lobal template repository]], so the code can be used by multiple wikis, without having to manually copy it after every update.g

Parameters[edit]

  • |1= = Wikidata QID for the article

Additionally, any named parameter used in {{citation}} may be entered and will overwrite the value in Wikidata. Using such parameters, with a value of unset, will suppress display of data from Wikidata.

Blank[edit]

<ref name="">{{Cite Q| XXQIDXX }}</ref>

Reference naming[edit]

For ease of use, you may wish to name your references to reflect the cited work, for example:

<ref name="Williams-2010">{{Cite Q|Q15625490}}</ref>

Parameter / entity map[edit]

This section lists where each of the template's supported parameters gets its data. P734}} Template:Columns-start

Bibliographic parameters[edit]

Script error: No such module "Columns".

Identifier parameters[edit]

Template:Columns-end

Examples[edit]

{{Cite Q|Q15625490}}
Lua error in Module:Cite_Q at line 13: attempt to index field 'wikibase' (a nil value).
{{Cite Q|Q15625490|page=42}}
Lua error in Module:Cite_Q at line 13: attempt to index field 'wikibase' (a nil value).
{{Cite Q|Q15625490|access-date=18 May 2017}}
Lua error in Module:Cite_Q at line 13: attempt to index field 'wikibase' (a nil value).
{{Cite Q|Q15625490|quote=lorem ipsum}}
Lua error in Module:Cite_Q at line 13: attempt to index field 'wikibase' (a nil value).
{{Cite Q|Q25766745}}
Lua error in Module:Cite_Q at line 13: attempt to index field 'wikibase' (a nil value).
{{Cite Q|Q25766745 |chapter=The Final Cut}} (with chapter specified)
Lua error in Module:Cite_Q at line 13: attempt to index field 'wikibase' (a nil value).
{{Cite Q|Q25766745 |pages=48-52}} (with pages)
Lua error in Module:Cite_Q at line 13: attempt to index field 'wikibase' (a nil value).
{{Cite Q|Q15625490|access-date=18 May 2017}}
Lua error in Module:Cite_Q at line 13: attempt to index field 'wikibase' (a nil value).
{{Cite Q|Q25766745|mode=cs1}}
Lua error in Module:Cite_Q at line 13: attempt to index field 'wikibase' (a nil value).
{{Cite Q|Q25766745|mode=cs2}}
Lua error in Module:Cite_Q at line 13: attempt to index field 'wikibase' (a nil value).
{{Cite Q|Q25766745|author-mask=1}}
Lua error in Module:Cite_Q at line 13: attempt to index field 'wikibase' (a nil value).

For additional examples, see testcases.

Module:Wd[edit]

Module:Wd can automatically cause this template to be invoked, e.g.,

{{Wikidata|references|raw|Q2978|P2046}}
Template:Wikidata

currently causes the following to be invoked:

{{Cite Q|Q15707237|pages=242}}
Lua error in Module:Cite_Q at line 13: attempt to index field 'wikibase' (a nil value).

because an Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P2046) statement on Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (Q2978) is referenced to be Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P248) Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (Q15707237) with Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P304) = 242.

Issues[edit]