Template:Cite DCB: Difference between revisions
simplify; no need to duplicate the {{cite encyclopedia}} defaults here, just pass last, name, author, authorlink right through |
move optional parameters down place them into conditional statements so they are only set if the calling page sets them do not set them to null |
||
Line 6: | Line 6: | ||
|edition = {{{edition|online}}} |
|edition = {{{edition|online}}} |
||
|publisher = {{{publisher|University of Toronto Press}}} |
|publisher = {{{publisher|University of Toronto Press}}} |
||
| last = {{{last|}}} |
|||
| last1 = {{{last1|}}} |
|||
| last2 = {{{last2|}}} |
|||
| last3 = {{{last3|}}} |
|||
| last4 = {{{last4|}}} |
|||
| first = {{{first|}}} |
|||
| first1 = {{{first1|}}} |
|||
| first2 = {{{first2|}}} |
|||
| first3 = {{{first3|}}} |
|||
| first4 = {{{first4|}}} |
|||
| author = {{{author|}}} |
|||
| author1 = {{{author1|}}} |
|||
| author2 = {{{author2|}}} |
|||
| author3 = {{{author3|}}} |
|||
| author4 = {{{author4|}}} |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
|origyear = {{#switch:{{{volume}}} |
|origyear = {{#switch:{{{volume}}} |
||
Line 111: | Line 90: | ||
| 15 | XV = Réal <!--Bélanger--> |
| 15 | XV = Réal <!--Bélanger--> |
||
}} |
}} |
||
<!-- Set optional parameters only if they are passed in otherwise don't set them to empty--> |
|||
|{{#if:{{{last|}}} |last |HIDE_PARAMETER}}={{{last|}}} |
|||
|{{#if:{{{last1|}}} |last1 |HIDE_PARAMETER}}={{{last1|}}} |
|||
|{{#if:{{{last2|}}} |last2 |HIDE_PARAMETER}}={{{last2|}}} |
|||
|{{#if:{{{last3|}}} |last3 |HIDE_PARAMETER}}={{{last3|}}} |
|||
|{{#if:{{{last4|}}} |last4 |HIDE_PARAMETER}}={{{last4|}}} |
|||
|{{#if:{{{first|}}} |first |HIDE_PARAMETER}}={{{first|}}} |
|||
|{{#if:{{{first1|}}} |first1 |HIDE_PARAMETER}}={{{first1|}}} |
|||
|{{#if:{{{first2|}}} |first2 |HIDE_PARAMETER}}={{{first2|}}} |
|||
|{{#if:{{{first3|}}} |first3 |HIDE_PARAMETER}}={{{first3|}}} |
|||
|{{#if:{{{first4|}}} |first4 |HIDE_PARAMETER}}={{{first4|}}} |
|||
|{{#if:{{{author|}}} |author |HIDE_PARAMETER}}={{{author|}}} |
|||
|{{#if:{{{author1|}}} |author1 |HIDE_PARAMETER}}={{{author1|}}} |
|||
|{{#if:{{{author2|}}} |author2 |HIDE_PARAMETER}}={{{author2|}}} |
|||
|{{#if:{{{author3|}}} |author3 |HIDE_PARAMETER}}={{{author3|}}} |
|||
|{{#if:{{{author4|}}} |author4 |HIDE_PARAMETER}}={{{author4|}}} |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
|{{#if:{{{ref|}}} |ref |HIDE_PARAMETER}}={{{ref|}}} |
|{{#if:{{{ref|}}} |ref |HIDE_PARAMETER}}={{{ref|}}} |
||
}}<noinclude> |
}}<noinclude> |
||
{{documentation}} |
{{documentation}} |
Revision as of 16:52, 7 March 2012
"Cite DCB". Dictionary of Canadian Biography (online ed.). University of Toronto Press. 1979–2005. {{cite encyclopedia}}
: Cite has empty unknown parameter: |HIDE_PARAMETER=
(help); External link in
(help)
|title=
This template is used on approximately 2,800 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
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:
which produces the following link item:
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
which produces the following link item:
|
New parameters:
- title=name — for example: title=Richard Willis Jameson
- url=url — for example: url=http://www.biographi.ca/en/bio/jameson_richard_willis_12E.html
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. Vol. XII (1891–1900) (online ed.). University of Toronto Press.
{{cite encyclopedia}}
: Cite has empty unknown parameter:|HIDE_PARAMETER=
(help)
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 (1979–2005). "Grenfell, Sir Wilfred Thomason". Dictionary of Canadian Biography (online ed.). University of Toronto Press.
{{cite encyclopedia}}
: Cite has empty unknown parameter:|HIDE_PARAMETER=
(help)
See also
{{Dictionary of Canadian Biography}}
a navigation template listing biography subjects in the DCB