Difference between revisions of "Template:Cite ODNB/sandbox"
imported>Trappist the monk |
imported>Rich Farmbrough |
||
| Line 1: | Line 1: | ||
| − | {{ | + | {{Cite encyclopedia |
| − | + | |encyclopedia={{{encyclopedia|[[Dictionary of National Biography#Oxford Dictionary of National Biography|Oxford Dictionary of National Biography]]}}} | |
| + | |edition={{{edition|online}}} | ||
| + | |publisher={{{publisher|Oxford University Press}}} | ||
| + | |ref={{{ref|harv}}} | ||
| − | + | |{{#if:{{{last|}}} |last |HIDE_PARAMETER1}}={{{last|}}} | |
| − | | | + | |{{#if:{{{last1|}}} |last1 |HIDE_PARAMETER2}}={{{last1|}}} |
| − | + | |{{#if:{{{author|}}} |author |HIDE_PARAMETER3}}={{{author|}}} | |
| − | + | |{{#if:{{{author1|}}} |author1 |HIDE_PARAMETER4}}={{{author1|}}} | |
| + | |{{#if:{{{authors|}}} |authors |HIDE_PARAMETER5}}={{{authors|}}} | ||
| − | + | |{{#if:{{{first|}}} |first |HIDE_PARAMETER6}}={{{first|}}} | |
| − | + | |{{#if:{{{first1|}}} |first1 |HIDE_PARAMETER7}}={{{first1|}}} | |
| − | |url- | + | |{{#if:{{{authorlink|}}} |authorlink |HIDE_PARAMETER8}}={{{authorlink|}}} |
| − | }} {{#ifeq: {{NAMESPACEE}} |<!-- is set -->|<!-- then -->[[Category:Wikipedia articles incorporating a citation from the ODNB]]}}<!-- | + | |{{#if:{{{author-link|}}} |author-link |HIDE_PARAMETER9}}={{{author-link|}}} |
| + | |{{#if:{{{author1-link|}}} |author1-link |HIDE_PARAMETER10}}={{{author1-link|}}} | ||
| + | |{{#if:{{{authorlink1|}}} |authorlink1 |HIDE_PARAMETER11}}={{{authorlink1|}}} | ||
| + | |||
| + | |{{#if:{{{last2|}}} |last2 |HIDE_PARAMETER12}}={{{last2|}}} | ||
| + | |{{#if:{{{author2|}}} |author2 |HIDE_PARAMETER13}}={{{author2|}}} | ||
| + | |{{#if:{{{first2|}}} |first2 |HIDE_PARAMETER14}}={{{first2|}}} | ||
| + | |||
| + | |{{#if:{{{authorlink2|}}} |authorlink2 |HIDE_PARAMETER15}}={{{authorlink2|}}} | ||
| + | |{{#if:{{{author2-link|}}} |author2-link |HIDE_PARAMETER16}}={{{author2-link|}}} | ||
| + | |||
| + | |{{#if:{{{last3|}}} |last3 |HIDE_PARAMETER17}}={{{last3|}}} | ||
| + | |{{#if:{{{author3|}}} |author3 |HIDE_PARAMETER18}}={{{author3|}}} | ||
| + | |{{#if:{{{first3|}}} |first3 |HIDE_PARAMETER19}}={{{first3|}}} | ||
| + | |||
| + | |{{#if:{{{authorlink3|}}} |authorlink3 |HIDE_PARAMETER20}}={{{authorlink3|}}} | ||
| + | |{{#if:{{{author3-link|}}} |author3-link |HIDE_PARAMETER21}}={{{author3-link|}}} | ||
| + | |||
| + | |{{#if:{{{title|}}} |title |HIDE_PARAMETER22}}={{{title|}}} | ||
| + | |{{#if:{{{article|}}} |title |HIDE_PARAMETER23}}={{{article|}}} | ||
| + | |{{#if:{{{url|}}} |url |HIDE_PARAMETER24}}={{{url|}}} | ||
| + | |||
| + | |{{#if:{{{doi|}}} |doi |HIDE_PARAMETER25}}={{{doi|}}} | ||
| + | |||
| + | |{{#if:{{{origyear|}}} |origyear |HIDE_PARAMETER26}}={{{origyear|}}} | ||
| + | |{{#if:{{{year|}}} |year |HIDE_PARAMETER27}}={{{year|}}} | ||
| + | |{{#if:{{{date|}}} |date |HIDE_PARAMETER28}}={{{date|}}} | ||
| + | |{{#if:{{{month|}}} |month |HIDE_PARAMETER29}}={{{month|}}} | ||
| + | |{{#if:{{{accessdate|}}} |accessdate |HIDE_PARAMETER30}}={{{accessdate|}}} | ||
| + | |||
| + | |{{#if:{{{postscript|}}} |postscript |HIDE_PARAMETER31}}={{{postscript|}}} | ||
| + | |{{#if:{{{separator|}}} |separator |HIDE_PARAMETER32}}={{{separator|}}} | ||
| + | |{{#if:{{{mode|}}} |mode |HIDE_PARAMETER33}}={{{mode|}}} | ||
| + | |||
| + | <!--Not implemented at present | ||
| + | |{{#if:{{{archiveurl|}}} |archiveurl |HIDE_PARAMETER34}}={{{archiveurl|}}} | ||
| + | |{{#if:{{{archivedate|}}}|archivedate |HIDE_PARAMETER35}}={{{archivedate|}}} | ||
| + | |{{#if:{{{deadurl|}}} |deadurl |HIDE_PARAMETER36}}={{{deadurle|}}} | ||
| + | |{{#if:{{{quote|}}} |quote |HIDE_PARAMETER37}}={{{quote|}}} | ||
| + | --> | ||
| + | <!-- These blocks are non-standard --> | ||
| + | <!-- Create the doi from the id --> | ||
| + | |{{#if:{{{id|}}}|{{#if:{{{doi|}}}|HIDE_PARAMETER38|doi}}|HIDE_PARAMETER38}}={{#if:{{{id|}}}|{{#if:{{{doi|}}}||10.1093/ref:odnb/{{{id|}}}}}}} | ||
| + | |||
| + | <!-- Create the url from the id note that https does not work for the view url for non-free pages ATM --> | ||
| + | |{{#if:{{{id|}}}|{{#if:{{{url|}}}|HIDE_PARAMETER39|url}}|HIDE_PARAMETER39}}={{#if:{{{id|}}}|{{#if:{{{url|}}}||http://www.oxforddnb.com/view/10.1093/ref:odnb/9780198614128.001.0001/odnb-9780198614128-e-{{{id|}}}}}}} | ||
| + | |||
| + | }} {{#if:{{{freearticle|}}}| |{{ODNBsub|sentence=yes}}}}<!-- | ||
| + | -->{{#ifeq: {{NAMESPACEE}} |<!-- is set -->|<!-- then -->[[Category:Wikipedia articles incorporating a citation from the ODNB]]}}<!-- | ||
-->{{#if:{{both|{{{id|}}}|{{{doi|}}}}}|[[Category:Pages using cite ODNB with both doi and id parameters]]}}<!-- | -->{{#if:{{both|{{{id|}}}|{{{doi|}}}}}|[[Category:Pages using cite ODNB with both doi and id parameters]]}}<!-- | ||
--><noinclude> | --><noinclude> | ||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> | ||
Revision as of 22:27, 21 October 2020
Oxford Dictionary of National Biography (online ed.). Oxford University Press. Missing or empty |title= (help)CS1 maint: ref=harv (link) Template:ODNBsub
| This is the template sandbox page for Template:Cite ODNB (diff). See also the companion subpage for test cases. |
| This template is a Citation Style 1 wrapper template based on {{Cite encyclopedia}}. For centralised Citation Style 1 discussions, see Help talk:Citation Style 1. |
Contents
Usage
{{Cite ODNB|id=ODNB article number|title=ODNB article name}}
For example, {{Cite ODNB|id=29986|title=Worsley, Sir Richard}} displays:
- "Worsley, Sir Richard". Oxford Dictionary of National Biography (online ed.). Oxford University Press. doi:10.1093/ref:odnb/29986. Template:ODNBsub
List of supported parameters
This template supports all parameters that are supported by {{cite encyclopedia}}. These few are pre-set within the template (may be overridden):
|encyclopedia=[[Oxford Dictionary of National Biography]]|edition=online|publisher=[[Oxford University Press]]
Article titles and identification:
|title=name of the ODNB article|id=number— This is nonstandard and consists of the "article number" (the last set of digits of an ODNB doi or biography URL); creates an internal doi if|doi=not present|doi=doi— Can be used instead of the parameter|id=|url=URL of the ODNB article— Can be used with or in place of the parameterid=, but is also essential for ODNB non-biography articles such as "Themes" which do not conform to the usual ODNB url biography format and do not have a doi. See, for example:- Patrick Little, ‘Major-generals (act. 1655–1657)’, Oxford Dictionary of National Biography, Oxford University Press. http://www.oxforddnb.com/view/theme/95468
- This can be handled like this (url):
{{Cite ODNB|first=Patrick|last=Little|title=Major-generals (act. 1655–1657)|url=http://www.oxforddnb.com/view/theme/95468}}- Little, Patrick. "Major-generals (act. 1655–1657)". Oxford Dictionary of National Biography (online ed.). Oxford University Press. Template:ODNBsub
- or like this (doi):
{{Cite ODNB|first=Patrick|last=Little|title=Major-generals (act. 1655–1657)|doi=10.1093/ref:odnb/95468}}- Little, Patrick. "Major-generals (act. 1655–1657)". Oxford Dictionary of National Biography (online ed.). Oxford University Press. doi:10.1093/ref:odnb/95468. Template:ODNBsub
- or like this (id):
{{Cite ODNB|first=Patrick|last=Little|title=Major-generals (act. 1655–1657)|id=95468}}- Little, Patrick. "Major-generals (act. 1655–1657)". Oxford Dictionary of National Biography (online ed.). Oxford University Press. doi:10.1093/ref:odnb/95468. Template:ODNBsub
Years and dates
|origyear=original year— The initial year of publication is usually 2004; if the entry has been updated, the current year parameter may be different.|year=year of ODNB article publication|date=date of ODNB article publication— If date and year parameters are both set then date parameter value is displayed but year parameter value is used by templates such as {{harvnb}}.|access-date=— Not needed as the ODNB has both date of article modification, a builtin archive and a doi structure; if used, requires|url=
Some articles are freely available to the public, such as Virginia Woolf. In those cases, you can add the |freearticle= parameter.
|freearticle=y(or omit){{Cite ODNB|id=37018|title=Woolf [née Stephen], (Adeline) Virginia|first=Lyndall|last=Gordon|freearticle=y}}- Gordon, Lyndall. "Woolf [née Stephen], (Adeline) Virginia". Oxford Dictionary of National Biography (online ed.). Oxford University Press. doi:10.1093/ref:odnb/37018.
Hidden categories
This template places articles that incorporate it into an administrative hidden category:
Pages using both |id= and |doi= are tracked in Category:Pages using cite ODNB with both doi and id parameters
See also
- {{ODNBsub}} — A subscription template used as a postscript by this template.
- {{DNBfirst}} — Can be placed on the same line as
{{Cite ODNB}}to allow readers who do not have access to ODNB to see older versions of the text now in the public domain. This is particularly useful if there is a version of the text available on Wikisource. Please refrain from using this template if the same DNB article is already available in the Wikipedia article via {{Cite DNB}} or {{DNB}}. - {{Who's Who}}
- Wikipedia:WikiProject Dictionary of National Biography.
- {{Subscription or libraries}} — A template for use when a subscription may be required or the source may be at a library.
| The above documentation is transcluded from Template:Cite ODNB/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |