Difference between revisions of "Template:Cite DCB"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
m (enable passing access-date parameter to parent template:cite encyclopedia)
imported>Trappist the monk
(sync from sandbox;)
 
Line 1: Line 1:
{{cite encyclopedia
+
{{#invoke:template wrapper|{{#if:{{{_debug|}}}|list|wrap}}|_template=cite encyclopedia
 +
  |_exclude=ID, name, _debug
 +
  |_reuse=title, volume <!-- these are reused -->
  
 
  <!-- set some default parameters with override options -->  
 
  <!-- set some default parameters with override options -->  
Line 5: Line 7:
 
  <!--If ID is set, use URL specified by ID. Otherwise, use url= value in the template. -->
 
  <!--If ID is set, use URL specified by ID. Otherwise, use url= value in the template. -->
 
  |url={{#if: {{{ID|}}} |http://www.biographi.ca/009004-119.01-e.php?&id_nbr={{{1|{{{ID}}}}}} |{{{url|}}} }}
 
  |url={{#if: {{{ID|}}} |http://www.biographi.ca/009004-119.01-e.php?&id_nbr={{{1|{{{ID}}}}}} |{{{url|}}} }}
  |encyclopedia    = {{{encyclopedia|[[Dictionary of Canadian Biography]]}}}
+
  |encyclopedia    = [[Dictionary of Canadian Biography]]
  |edition  = {{{edition|online}}}
+
  |edition  = online
  |publisher = {{{publisher|University of Toronto Press}}}
+
  |publisher = University of Toronto Press
  
  |origyear = {{{origyear| {{#switch:{{{volume}}}
+
  |orig-date = {{#switch:{{{volume}}}
 
   | 1 | I    = 1966
 
   | 1 | I    = 1966
 
   | 2 | II    = 1969
 
   | 2 | II    = 1969
   }} }}}
+
   }}
  
  |year = {{{year|{{#switch:{{{volume}}}
+
  |year = {{#switch:{{{volume}}}
 
   | 1 | I    = 1979
 
   | 1 | I    = 1979
 
   | 2 | II    = 1979
 
   | 2 | II    = 1979
Line 38: Line 40:
 
   | 22 | XXII = 2016 <!--"1991–2000 (some biographies are online)" [April 2016]-->
 
   | 22 | XXII = 2016 <!--"1991–2000 (some biographies are online)" [April 2016]-->
 
   | <!-- default if no volume specified --> 1979–2016
 
   | <!-- default if no volume specified --> 1979–2016
   }} }}}
+
   }}
  
 
  <!--set these parameters if set externally -->
 
  <!--set these parameters if set externally -->
  |{{#if:{{{volume|}}}  |volume  |HIDE_PARAMETER1}}= {{#switch:{{{volume}}}
+
  |volume={{#switch:{{{volume}}}
 
   | 1 | I    = I (1000–1700)
 
   | 1 | I    = I (1000–1700)
 
   | 2 | II    = II (1701–1740)
 
   | 2 | II    = II (1701–1740)
Line 66: Line 68:
 
   }}
 
   }}
  
|{{#if:{{{volume|}}} |editor-last |HIDE_PARAMETER2}}= {{#switch:{{{volume}}}
+
  |editor-last={{#switch:{{{volume}}}
 
   | 1 | I    = <!--George Williams--> Brown
 
   | 1 | I    = <!--George Williams--> Brown
 
   | 2 | II | 10 | X = <!--David--> Hayne
 
   | 2 | II | 10 | X = <!--David--> Hayne
Line 88: Line 90:
 
   | 21 | XXI
 
   | 21 | XXI
 
   | 22 | XXII = <!--Ramsay--> Cook
 
   | 22 | XXII = <!--Ramsay--> Cook
 +
  }}
  
  }}
+
  |editor-first={{#switch:{{{volume}}}
|{{#if:{{{volume|}}} |editor-first |HIDE_PARAMETER3}}= {{#switch:{{{volume}}}
 
 
   | 1 | I    = George Williams <!--Brown-->
 
   | 1 | I    = George Williams <!--Brown-->
 
   | 2 | II | 10 | X = David <!--Hayne-->
 
   | 2 | II | 10 | X = David <!--Hayne-->
Line 113: Line 115:
 
   | 22 | XXII = Ramsay <!--Cook-->
 
   | 22 | XXII = Ramsay <!--Cook-->
 
   }}
 
   }}
|{{#if:{{{volume|}}} |editor2-last |HIDE_PARAMETER4}}= {{#switch:{{{volume}}}
+
 
 +
  |editor2-last={{#switch:{{{volume}}}
 
   | 13 | XIII  
 
   | 13 | XIII  
 
   | 14 | XIV =<!--Jean--> Hamelin
 
   | 14 | XIV =<!--Jean--> Hamelin
Line 125: Line 128:
 
   | 22 | XXII = <!--Réal--> Bélanger
 
   | 22 | XXII = <!--Réal--> Bélanger
 
   }}
 
   }}
|{{#if:{{{volume|}}} |editor2-first |HIDE_PARAMETER5}}= {{#switch:{{{volume}}}
+
  |editor2-first={{#switch:{{{volume}}}
 
   | 13 | XIII  
 
   | 13 | XIII  
 
   | 14 | XIV = Jean <!--Hamelin-->
 
   | 14 | XIV = Jean <!--Hamelin-->
Line 137: Line 140:
 
   | 22 | XXII = Réal <!--Bélanger-->
 
   | 22 | XXII = Réal <!--Bélanger-->
 
   }}
 
   }}
<!-- Set optional parameters only if they are passed in otherwise don't set them to empty-->
 
|{{#if:{{{last|}}}  |last  |HIDE_PARAMETER6}}={{{last|}}}
 
|{{#if:{{{last1|}}} |last1 |HIDE_PARAMETER7}}={{{last1|}}}
 
|{{#if:{{{last2|}}} |last2 |HIDE_PARAMETER8}}={{{last2|}}}
 
|{{#if:{{{last3|}}} |last3 |HIDE_PARAMETER9}}={{{last3|}}}
 
|{{#if:{{{last4|}}} |last4 |HIDE_PARAMETER10}}={{{last4|}}}
 
 
|{{#if:{{{first|}}}  |first  |HIDE_PARAMETER11}}={{{first|}}}
 
|{{#if:{{{first1|}}} |first1 |HIDE_PARAMETER12}}={{{first1|}}}
 
|{{#if:{{{first2|}}} |first2 |HIDE_PARAMETER13}}={{{first2|}}}
 
|{{#if:{{{first3|}}} |first3 |HIDE_PARAMETER14}}={{{first3|}}}
 
|{{#if:{{{first4|}}} |first4 |HIDE_PARAMETER15}}={{{first4|}}}
 
 
|{{#if:{{{author|}}} |author  |HIDE_PARAMETER16}}={{{author|}}}
 
|{{#if:{{{author1|}}} |author1  |HIDE_PARAMETER17}}={{{author1|}}}
 
|{{#if:{{{author2|}}} |author2  |HIDE_PARAMETER18}}={{{author2|}}}
 
|{{#if:{{{author3|}}} |author3  |HIDE_PARAMETER19}}={{{author3|}}}
 
|{{#if:{{{author4|}}} |author4  |HIDE_PARAMETER20}}={{{author4|}}}
 
 
|{{#if:{{{authorlink|}}} |authorlink  |HIDE_PARAMETER21}}={{{authorlink|}}}
 
|{{#if:{{{authorlink1|}}} |authorlink1  |HIDE_PARAMETER22}}={{{authorlink1|}}}
 
|{{#if:{{{authorlink2|}}} |authorlink2  |HIDE_PARAMETER23}}={{{authorlink2|}}}
 
|{{#if:{{{authorlink3|}}} |authorlink3  |HIDE_PARAMETER24}}={{{authorlink3|}}}
 
|{{#if:{{{authorlink4|}}} |authorlink4  |HIDE_PARAMETER25}}={{{authorlink4|}}}
 
 
|{{#if:{{{coauthors|}}} |coauthors  |HIDE_PARAMETER26}}={{{coauthors|}}}
 
 
|{{#if:{{{ref|}}}  |ref  |HIDE_PARAMETER27}}={{{ref|}}}
 
 
|{{#if:{{{accessdate|{{{access-date|}}}}}} |access-date  |HIDE_PARAMETER28}}={{{accessdate|{{{access-date|}}}}}}
 
 
 
}}<noinclude>
 
}}<noinclude>
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 11:26, 11 October 2020

"Template:PAGENAMEBASE". Dictionary of Canadian Biography (online ed.). University of Toronto Press. 1979–2016.

Template documentation[view] [edit] [history] [purge]

Usage

This template is a wrapper around {{cite encyclopedia}} it is intended to format a link to the online edition to the Dictionary of Canadian Biography Online (DCB) so that it appears as a standard citation, while filling in many of the fields base on the fixed identification number and the volume.

Until the second half of 2014 the access to web pages of the Dictionary of Canadian Biography Online was through identification numbers. The site no longer uses this method but instead locates the page under the name of the individual with the volume number. So the article on Richard Willis Jameson is now located at http://www.biographi.ca/en/bio/jameson_richard_willis_12E.html How to use the legacy parameters is described below in the collapse box and access via that method is still supported by the DCB website (presumably to support legacy links).

Legacy parameters

{{Cite DCB|ID=####|name=}}

The ID parameter is derived from the "id_nbr" parameter of the articles URL.

For example, if the biography item for Richard Willis Jameson is located at this URL:

http://www.biographi.ca/009004-119.01-e.php?&id_nbr=6182

Then the ID parameter in this case is 6182.

Set up the following template line for ID=6182:

{{Cite DCB|ID=6182}}

which produces the following link item:

"Richard Willis Jameson". Dictionary of Canadian Biography (online ed.). University of Toronto Press. 1979–2016.

The name parameter should be filled out as the entry in the DCB is in the format surname, first names while Wikipedia entries are in the format

be used when the name of the biography is different from that of the Wikipedia article, such as when the template us used in a reference to another person

{{Cite DCB|ID=6186|name=Jenkins, John }}

which produces the following link item:

"Jenkins, John". Dictionary of Canadian Biography (online ed.). University of Toronto Press. 1979–2016.

New parameters:

In addition the parameters:

  • volume=number or Roman numeral will fill in additional details, including editors and year of publication.
  • ref=harv works as it does in the template {{cite encyclopedia}} and allows this template to be used as a general reference and linked to a short citation.

Finally, the parameters:

  • last=last name (or last1, last2, ...)
  • first=first name (or first1, first2, ...)
  • author=first-name initial last-name (or author1, author2, ...)
  • authorlink=title of Wikipedia article about the author (or authorlink1, authorlink2, ...)
  • year=year — The volume parameter will fill this out for volume (I–XV, 1–15), but for the entries in the volumes after XV (15), the entry is added online with a publication year that it is placed on line, or most recent revision year if changes have been made to the entry.
  • origyear=year — For the entries in the volumes after XV (15), the entry is added online with an original year of publication for the year the article was put online and if the articles has been revised since.

are passed through, if specified, to the underlying {{cite encyclopedia}} template. See that template's documentation.

An example of a entry for (volumes 1–15):

{{Cite DCB |last=Moir |first=John S. |title=Jenkins, John |volume=12 |url=http://www.biographi.ca/en/bio/jenkins_john_12E.html}}

produces the following link item:

Moir, John S. (1990). "Jenkins, John". In Halpenny, Francess G (ed.). Dictionary of Canadian Biography. XII (1891–1900) (online ed.). University of Toronto Press.

An example of an entry to a more recent volume:

{{Cite DCB|last=Rompkey |first=Ronald |year=2015 |origyear=2011 |title=Grenfell, Sir Wilfred Thomason |volume=XVI |url=http://www.biographi.ca/en/bio/grenfell_wilfred_thomason_16E.html}}

produces the following link item:

Rompkey, Ronald (2015) [2011]. "Grenfell, Sir Wilfred Thomason". In Cook, Ramsay; Bélanger, Réal (eds.). Dictionary of Canadian Biography. XVI (1931–1940) (online ed.). University of Toronto Press.

See also

{{Dictionary of Canadian Biography}} a navigation template listing biography subjects in the DCB