Difference between revisions of "Template:Zotero"

From DFM Wiki
(Remove "ref" tags so we can use this inside the cite tool.)
(Allow the ID to be provided as a single positional argument.)
Tag: 2017 source edit
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<includeonly>{{#get_web_data:
 
<includeonly>{{#get_web_data:
  url=https://api.zotero.org/groups/2183860/items/{{{id}}}?format=json&include=citation&style=chicago-fullnote-bibliography&linkwrap=1
+
  url=https://api.zotero.org/groups/{{{group|2183860}}}/items/{{{id|{{{1}}}}}}?format=json&include=citation&style=https%3A%2F%2Fdriedfishmatters.org%2Fstatic%2Fchicago-note-bibliography-16th-edition-nosuffix.csl&linkwrap=0
 
  |format=JSON
 
  |format=JSON
 
  |data=citation=citation
 
  |data=citation=citation
}}{{#external_value:citation}}</includeonly>
+
|cache seconds=157248000
<noinclude>This is a template for Zotero citations.</noinclude>
+
}}{{#if:{{{prefix|}}}|{{{prefix}}}&nbsp;|}}[https://www.zotero.org/groups/{{{group|2183860}}}/items/{{{id}}} {{#external_value:citation}}]{{#if:{{{locator|}}}|, {{{locator}}}|}}{{#if:{{{suffix|}}}|&nbsp;{{{suffix}}}|}}</includeonly><noinclude><templatedata>
 +
{
 +
"params": {
 +
"id": {
 +
"label": "Zotero item identifier",
 +
"description": "This is the 8-character reference ID found in a Zotero item URL.",
 +
"example": "N46G9Q4Z",
 +
"required": true,
 +
"aliases": [
 +
"1"
 +
],
 +
"type": "string"
 +
},
 +
"group": {
 +
"description": "Numeric identifier of the Zotero group library in which the reference is found.",
 +
"default": "2183860"
 +
},
 +
"prefix": {
 +
"label": "Prefix",
 +
"description": "Citation prefix",
 +
"example": "see also"
 +
},
 +
"locator": {
 +
"label": "Locator",
 +
"description": "The page, section, or paragraph number",
 +
"example": "52"
 +
},
 +
"suffix": {
 +
"description": "Citation suffix (text to come at the end of the citation)"
 +
}
 +
},
 +
"description": "Template for importing a formatted citation from the DFM Zotero library. Simply supply the Zotero ID for an item in the DFM library, and MediaWiki will communicate with the Zotero server to retrieve a formatted citation. The template is intended for usage within footnote citations."
 +
}
 +
</templatedata></noinclude>

Latest revision as of 09:58, 30 November 2021

Template for importing a formatted citation from the DFM Zotero library. Simply supply the Zotero ID for an item in the DFM library, and MediaWiki will communicate with the Zotero server to retrieve a formatted citation. The template is intended for usage within footnote citations.

Template parameters

ParameterDescriptionTypeStatus
Zotero item identifierid 1

This is the 8-character reference ID found in a Zotero item URL.

Example
N46G9Q4Z
Stringrequired
Groupgroup

Numeric identifier of the Zotero group library in which the reference is found.

Default
2183860
Unknownoptional
Prefixprefix

Citation prefix

Example
see also
Unknownoptional
Locatorlocator

The page, section, or paragraph number

Example
52
Unknownoptional
Suffixsuffix

Citation suffix (text to come at the end of the citation)

Unknownoptional