Difference between revisions of "Template:Cite DNBIE/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>Trappist the monk
imported>Trappist the monk
Line 1: Line 1:
 
{{#if: {{{no-icon|{{{noicon|}}}<!-- -->}}}|<!--empty-->|
 
{{#if: {{{no-icon|{{{noicon|}}}<!-- -->}}}|<!--empty-->|
   <!--else-->{{#ifeq: {{{wstitle|{{{1|}}}}}}|<!--eq to empty-->|
+
   <!--else-->[[File:PD-icon.svg|12px|alt=|link=]]&nbsp;<!--endif
              <!--then-->[[File:PD-icon.svg|12px|alt=|link=]]&nbsp;
 
              |<!--else-->[[File:Wikisource-logo.svg|12px|alt=|link=]]&nbsp;}}<!--endif
 
 
-->}}<!--
 
-->}}<!--
 
  cite encyclopedia wrapper
 
  cite encyclopedia wrapper
 
-->{{#invoke:template wrapper|{{#if:{{{_debug|}}}|list|wrap}}|_template=cite encyclopedia
 
-->{{#invoke:template wrapper|{{#if:{{{_debug|}}}|list|wrap}}|_template=cite encyclopedia
   |_exclude=display, no-icon, noicon, wstitle, _debug
+
   |_exclude=no-icon, noicon, title, _debug
   |_reuse=page, pages, title <!-- these are reused -->
+
   |_reuse=url <!-- these are reused -->
| editor-first = Sidney
 
| editor-last = Lee
 
| year = 1903
 
| title = <!--
 
          Add a link to wstitle, or print title or do nothing
 
          -->{{#if:{{{wstitle|{{{1|}}}<!--wst-->}}}|<!--
 
          then-->[[s:{{{wstitle|{{{1|}}}<!--wst-->}}} (DNB00)|{{{display|{{{wstitle|{{{1|}}}<!--wst-->}}}<!--dis-->}}}]]<!--
 
          else-->|{{#if:{{{title|}}}|{{{title|}}}<!--endif title-->}}<!--endif wstitle-->}}
 
  
<!--Only set url= if title= is also set.-->
+
  |editor-first=Sidney
    |{{#if: {{{title|}}} |{{#if:{{{url|}}} |url  |HIDE_PARAMETER}} |HIDE_PARAMETER}}={{#if: {{{title|}}} |{{#if:{{{url|}}} | {{{url|}}} }} }}
+
  |editor-last=Lee
| encyclopedia  =[[Dictionary of National Biography]]
+
  |year=1903
| volume =[https://archive.org/stream/dictionaryofnati00leesuoft#page/n2/mode/1up Index and Epitome]
+
  |entry={{{title|<span class="error" style="font-size: 100%; font-style:normal;">missing required entry title</span>}}}
|publisher = Cambridge University Press
+
  |entry-url={{#if: {{{title|}}}|{{#if:{{{url|}}}|{{{url|}}}|{{#if:{{{page|}}}{{{pages|}}}
|ref = {{{ref|}}}
+
                  |https://archive.org/stream/dictionaryofnati00leesuoft#page/{{Str number/trim|{{{page|{{{pages|}}}}}}}}/mode/1up}}<!-- page -->}}<!-- url -->}}<!-- title -->
<!--
+
 
The string manipulation for the pages parameter is done using three template functions
+
  |title=Index and Epitome
*page numbers are entered either as "page number, page number" or as  "page number-page number" so the template function {{Str number/trim {{{pages}}} }} will extract the first number and it is place into the URL and added a second time so that it is displayed.
+
  |url=https://archive.org/stream/dictionaryofnati00leesuoft#page/n2/mode/1up
* The remained of the string is then extracted using two template functions.  {{Str number|{{{pages}}} }} will return the position of the first non numeric character ("," or "-"), this is passed into {{Str right}} which extracts the remained of the string which is then printed out as a concatenation after the closing of the URL link.
+
  |encyclopedia=[[Dictionary of National Biography]]  
-->
+
  |publisher=Cambridge University Press
|page={{#if:{{{page|}}}| [https://archive.org/stream/dictionaryofnati00leesuoft#page/{{Str number/trim|{{{page}}}}}/mode/1up {{{page|}}}] }}
 
|pages={{#if:{{{pages|}}}| [https://archive.org/stream/dictionaryofnati00leesuoft#page/{{Str number/trim|{{{pages}}}}}/mode/1up {{Str number/trim|{{{pages}}}}}]{{Str right|{{{pages}}}|{{Str number|{{{pages}}} }}}} }}
 
 
}}<includeonly><!-- no white space
 
}}<includeonly><!-- no white space
 
-->{{#ifeq: {{NAMESPACEE}} |<!--is set-->|<!--
 
-->{{#ifeq: {{NAMESPACEE}} |<!--is set-->|<!--

Revision as of 15:01, 15 April 2019

 Lee, Sidney, ed. (1903). "missing required entry title". Index and Epitome. Dictionary of National Biography. Cambridge University Press.

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

Usage

Cite DNBIE is a replacement for {{cite encyclopedia}} for citing the Dictionary of National Biography Index and Epitome volume.

The template fills out some parameters such as editor, date, publisher automatically. This template supports all of the parameters normally available to {{cite encyclopedia}}. There is an additional parameter not supported by {{cite encyclopedia}}:

  • noicon – when set to any value, this parameter hides the normal public domain icon; alias: no-icon

Normal parameters used by this template are: {{Cite DNBIE|noicon=1|title=|page=|pages=}}

  • title=page name — (required) use this parameter to identify the name of the entry in the DNB I&E
  • in-source locators (use only one of these):
    • page=page number — this template links |title= to the page in the facsimile copy of the DNB I&E at Internet Archive, so providing the page number helps readers find the entry in the DNBIE
    • pages=page numbers — as for page= but for entries that span more than one page.
  • ref=harv — turns on parameter used by templates such as {{harv}}

Entries in DNB I&E include the volume and page number of the unabridged article in the main DNB. You can link to those articles at Wikisource choosing the appropriate DNB template from the list below. Wikisource:Dictionary of National Biography, Index and Epitome does not exist so this template does not support direct access to Wikisource.

Hidden categories

This template includes a hidden category:

See also

{{#lst:Template:Cite DNB/doc|DNB_see_also}}