Difference between revisions of "Template:BONAP"

From blackwiki
Jump to navigation Jump to search
imported>Erutuon
m (→‎top: genus and species should be italicized)
imported>Erutuon
(add state parameter to switch to state maps)
Line 4: Line 4:
 
                 | ref = {{citation
 
                 | ref = {{citation
 
                         | mode = {{{mode|CS1}}}
 
                         | mode = {{{mode|CS1}}}
                         | url = http://bonap.net/MapGallery/County/{{{genus|}}}%20{{{species|}}}.png
+
                         | url = http://bonap.net/MapGallery/{{#if:{{{state|}}}|State|County}}/{{{genus|}}}%20{{{species|}}}.png
 
                         | title = ''{{{genus|}}} {{{species|}}}''
 
                         | title = ''{{{genus|}}} {{{species|}}}''
                         | work = County-level distribution map from the North American Plant Atlas (NAPA)
+
                         | work = {{#if:{{{state|}}}|State|County}}-level distribution map from the North American Plant Atlas (NAPA)
 
                         | publisher = Biota of North America Program (BONAP)
 
                         | publisher = Biota of North America Program (BONAP)
 
                         | date = 2013
 
                         | date = 2013
 
                         | access-date = {{{access-date|{{{accessdate|}}} }}}
 
                         | access-date = {{{access-date|{{{accessdate|}}} }}}
 
                         }}
 
                         }}
                 | link = [http://bonap.net/MapGallery/County/{{{genus|}}}%20{{{species|}}}.png County-level map from the Biota of North America Program (BONAP): {{{genus|}}} {{{species|}}}]
+
                 | link = [http://bonap.net/MapGallery/{{#if:{{{state|}}}|State|County}}/{{{genus|}}}%20{{{species|}}}.png County-level map from the Biota of North America Program (BONAP): {{{genus|}}} {{{species|}}}]
 
                 | {{color|red|Please place either link or ref as the first parameter of {{tl|BONAP}}.}}
 
                 | {{color|red|Please place either link or ref as the first parameter of {{tl|BONAP}}.}}
 
             }}
 
             }}
Line 17: Line 17:
 
                 | ref = {{citation
 
                 | ref = {{citation
 
                         | mode = {{{mode|CS1}}}
 
                         | mode = {{{mode|CS1}}}
                         | url = http://bonap.net/NAPA/TaxonMaps/Genus/County/{{{genus|}}}
+
                         | url = http://bonap.net/NAPA/TaxonMaps/Genus/{{#if:{{{state|}}}|State|County}}/{{{genus|}}}
 
                         | title = ''{{{genus|}}}''
 
                         | title = ''{{{genus|}}}''
                         | work = County-level distribution maps from the North American Plant Atlas (NAPA)
+
                         | work = {{#if:{{{state|}}}|State|County}}-level distribution maps from the North American Plant Atlas (NAPA)
 
                         | publisher = Biota of North America Program (BONAP)
 
                         | publisher = Biota of North America Program (BONAP)
 
                         | date = 2013
 
                         | date = 2013
 
                         | access-date = {{{access-date|{{{accessdate|}}} }}}
 
                         | access-date = {{{access-date|{{{accessdate|}}} }}}
 
                         }}
 
                         }}
                 | link = [http://bonap.net/NAPA/TaxonMaps/Genus/County/{{{genus|}}} County-level maps from the Biota of North America Program (BONAP): {{{genus|}}}]
+
                 | link = [http://bonap.net/NAPA/TaxonMaps/Genus/{{#if:{{{state|}}}|State|County}}/{{{genus|}}} {{#if:{{{state|}}}|State|County}}-level maps from the Biota of North America Program (BONAP): {{{genus|}}}]
 
                 | {{color|red|Please place either link or ref as the first parameter of {{tl|BONAP}}.}}
 
                 | {{color|red|Please place either link or ref as the first parameter of {{tl|BONAP}}.}}
 
             }}
 
             }}

Revision as of 18:40, 13 July 2018

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

Template:Underused external link template

Usage

This template links to the county-level and the state- and province-level plant distribution maps for species or genera in the Biota of North America Program's North American Plant Atlas. At the moment, it is meant to be used in footnotes, not external links sections.

The first parameter chooses between ref or link. Place the genus name in parameter |genus= if you are linking to either a genus page or a species map, and add the specific epithet in parameter |species= if you are linking to a species map. By default, links to the county-level maps. Add |state= with any non-empty value to switch to the state- and province-level maps.

By default, Citation Style 1 is used. Switch to Citation Style 2 using |mode=cs2.

Syntax
{{BONAP}}
Examples
  1. {{BONAP |genus=Campanula |species=rotundifolia |date=2014 |access-date=31 December 2025}}
  2. {{BONAP |genus=Campanula |date=2014 |access-date=31 December 2025}}
  3. {{BONAP |genus=Campanula |species=rotundifolia |state=1 |date=2014 |access-date=31 December 2025}}
  4. {{BONAP |genus=Campanula |state=1 |date=2014 |access-date=31 December 2025}}
yield
  1. Please place either link or ref as the first parameter of {{BONAP}}.
  2. Please place either link or ref as the first parameter of {{BONAP}}.
  3. Please place either link or ref as the first parameter of {{BONAP}}.
  4. Please place either link or ref as the first parameter of {{BONAP}}.