Template:PLANTS/testcases
This is the template test cases page for the sandbox of Template:PLANTS. to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki; see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins and parsers with these links: |
Template behavior
[edit]See https://plants.sc.egov.usda.gov/home/help for Citing the PLANTS Database. This change will cite the author, work, publisher, and location as requested on the PLANTS DB help page.
- PLANTS currently sets the following:
| url = https://plants.sc.egov.usda.gov/home/plantProfile?symbol={{Trim|{{{id|{{{symbol}}}}}}}} | title = ''{{{name|{{{taxon}}}}}}'' | publisher = [[Natural Resources Conservation Service]] PLANTS Database. [[United States Department of Agriculture|USDA]]
- PLANTS/sandbox sets the following:
| last1 = ((USDA, NRCS)) | author-link1 = Natural Resources Conservation Service | date = {{{date|n.d.}}} | url = https://plants.sc.egov.usda.gov/home/plantProfile?symbol={{Trim|{{{id|{{{symbol|}}}}}}}} | title = ''{{{name|{{{taxon|{{{id|{{{symbol|Search}}}}}}}}}}}}'' | website = The PLANTS Database (plants.usda.gov) | publisher = National Plant Data Team | location = Greensboro, North Carolina | language = en
If date
is not specified, it will default to n.d.
Test cases
[edit]Basic
[edit]- Set nothing
{{PLANTS}}
USDA, NRCS (n.d.). "Search". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "Search". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
- Basic access date cases
{{PLANTS}}
USDA, NRCS (n.d.). "Vaccinium macrocarpon". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 11 November 2014.
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "Vaccinium macrocarpon". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 11 November 2014.
{{PLANTS}}
USDA, NRCS (n.d.). "Torreya californica". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved December 11, 2015.
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "Torreya californica". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved December 11, 2015.
{{PLANTS}}
USDA, NRCS (n.d.). "Sparaxis tricolor". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 24 November 2015.
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "Sparaxis tricolor". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 24 November 2015.
{{PLANTS}}
USDA, NRCS (n.d.). "Melissa officinalis". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 6 July 2015.
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "Melissa officinalis". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 6 July 2015.
Date and access date
[edit]- Date and access date
{{PLANTS}}
USDA, NRCS (2014). "Symphyotrichum ontarionis". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 6 July 2015.
{{PLANTS/sandbox}}
USDA, NRCS (2014). "Symphyotrichum ontarionis". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 6 July 2015.
- Date but no access date
{{PLANTS}}
USDA, NRCS (2016). "Symphyotrichum anticostense". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
{{PLANTS/sandbox}}
USDA, NRCS (2016). "Symphyotrichum anticostense". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
- No dates
{{PLANTS}}
USDA, NRCS (n.d.). "Symphyotrichum campestre". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "Symphyotrichum campestre". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
- String of the same date with multiple calls in same article
{{PLANTS}}
USDA, NRCS (2015a). "Symphyotrichum ontarionis". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 6 July 2015.
{{PLANTS/sandbox}}
USDA, NRCS (2015a). "Symphyotrichum ontarionis". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 6 July 2015.
{{PLANTS}}
USDA, NRCS (2015b). "Symphyotrichum anticostense". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 6 July 2015.
{{PLANTS/sandbox}}
USDA, NRCS (2015b). "Symphyotrichum anticostense". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 6 July 2015.
{{PLANTS}}
USDA, NRCS (2015c). "Symphyotrichum campestre". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 6 July 2015.
{{PLANTS/sandbox}}
USDA, NRCS (2015c). "Symphyotrichum campestre". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 6 July 2015.
Some examples in place in articles
[edit]{{PLANTS}}
USDA, NRCS (n.d.). "Vaccinium macrocarpon". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 11 November 2014.
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "Vaccinium macrocarpon". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 11 November 2014.
{{PLANTS}}
USDA, NRCS (n.d.). "Pseudotsuga menziesii". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 2018-11-07.
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "Pseudotsuga menziesii". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 2018-11-07.
{{PLANTS}}
USDA, NRCS (n.d.). "Pinus resinosa". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 2018-11-07.
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "Pinus resinosa". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 2018-11-07.
{{PLANTS}}
USDA, NRCS (n.d.). "Photinia melanocarpa". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "Photinia melanocarpa". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
{{PLANTS}}
USDA, NRCS (n.d.). "Photinia floribunda". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "Photinia floribunda". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
{{PLANTS}}
USDA, NRCS (n.d.). "Prunus virginiana var. melanocarpa". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "Prunus virginiana var. melanocarpa". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
{{PLANTS}}
USDA, NRCS (n.d.). "Strychnos nux-vomica". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 4 December 2015.
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "Strychnos nux-vomica". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 4 December 2015.
{{PLANTS}}
USDA, NRCS (n.d.). "Pritchardia schattaueri". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 14 October 2015.
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "Pritchardia schattaueri". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 14 October 2015.
{{PLANTS}}
USDA, NRCS (n.d.). "Clitoria ternatea". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 31 Jul 2016.
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "Clitoria ternatea". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 31 Jul 2016.
Let's check for expected (or not) errors in the sandbox
[edit]- Invalid id, no taxon/name/title - error = no ; behavior - title = id and url is built properly
{{PLANTS}}
USDA, NRCS (n.d.). "ZZZZ". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "ZZZZ". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
- Invalid symbol, no taxon/name/title - error = no ; behavior - title = symbol and url is built properly
{{PLANTS}}
USDA, NRCS (n.d.). "ZZZZ". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "ZZZZ". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
- Set id only - error = no; behavior - title is id
{{PLANTS}}
USDA, NRCS (n.d.). "SYCOR". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "SYCOR". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
- Set taxon and title - error = no; behavior - title overrides taxon
{{PLANTS}}
USDA, NRCS (n.d.). "TITLE". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "TITLE". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
- Set taxon and name - error = no; behavior - name overrides taxon
{{PLANTS}}
USDA, NRCS (n.d.). "NAME". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "NAME". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
- Set name and taxon and title - error = no; behavior - title overrides name and taxon
{{PLANTS}}
USDA, NRCS (n.d.). "TITLE". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "TITLE". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
- Set website - error = no
{{PLANTS}}
USDA, NRCS (n.d.). "Symphyotrichum cordifolium". plants.gov. Greensboro, North Carolina: National Plant Data Team.
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "Symphyotrichum cordifolium". plants.gov. Greensboro, North Carolina: National Plant Data Team.
- Set work - error = yes
{{PLANTS}}
USDA, NRCS (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. {{cite web}}
: More than one of |work=
and |website=
specified (help)
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. {{cite web}}
: More than one of |work=
and |website=
specified (help)
- Set author - error = yes
{{PLANTS}}
USDA, NRCS (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. {{cite web}}
: More than one of |author=
and |last1=
specified (help)
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. {{cite web}}
: More than one of |author=
and |last1=
specified (help)
- Set author1 - error = yes
{{PLANTS}}
USDA, NRCS (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. {{cite web}}
: More than one of |author1=
and |last1=
specified (help)
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. {{cite web}}
: More than one of |author1=
and |last1=
specified (help)
- Set author2 - error = no
{{PLANTS}}
USDA, NRCS; AUTHOR2TEST (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.{{cite web}}
: CS1 maint: numeric names: authors list (link)
{{PLANTS/sandbox}}
USDA, NRCS; AUTHOR2TEST (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.{{cite web}}
: CS1 maint: numeric names: authors list (link)
- Set last - error = yes
{{PLANTS}}
LASTTEST (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. {{cite web}}
: More than one of |last1=
and |last=
specified (help)
{{PLANTS/sandbox}}
LASTTEST (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. {{cite web}}
: More than one of |last1=
and |last=
specified (help)
- Set last1 - error = no
{{PLANTS}}
LAST1TEST (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.{{cite web}}
: CS1 maint: numeric names: authors list (link)
{{PLANTS/sandbox}}
LAST1TEST (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.{{cite web}}
: CS1 maint: numeric names: authors list (link)
- Set last2 - error = no
{{PLANTS}}
USDA, NRCS; LAST2TEST (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.{{cite web}}
: CS1 maint: numeric names: authors list (link)
{{PLANTS/sandbox}}
USDA, NRCS; LAST2TEST (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.{{cite web}}
: CS1 maint: numeric names: authors list (link)
- Set author-link1 - error = no
{{PLANTS}}
USDA, NRCS (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.
- Set author-link - error = yes
{{PLANTS}}
USDA, NRCS (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. {{cite web}}
: More than one of |author-link1=
and |author-link=
specified (help)
{{PLANTS/sandbox}}
USDA, NRCS (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. {{cite web}}
: More than one of |author-link1=
and |author-link=
specified (help)