Template:Tree Infobox: Difference between revisions

From Heritage Apple Corps
Bot (talk | contribs)
Bot: Create infobox template
Bot (talk | contribs)
Fix optional fields showing literal {{{param}}} when empty
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{| class="wikitable" style="float:right; margin-left:1em; width:300px; background:#f9f9f9;"
<includeonly>{| class="wikitable" style="float:right; margin-left:1em; width:300px; background:#f9f9f9;"
! colspan="2" style="background:#{{#switch:{{{condition}}}|good=4a7c59|fair=c9a227|poor=8b2635|dead=666666|888888}}; color:white; font-size:1.1em;" | Tree #{{{tag}}}
! colspan="2" style="background:#{{#switch:{{{condition}}}|good=4a7c59|fair=c9a227|poor=8b2635|dead=666666|888888}}; color:white; font-size:1.1em;" | Tree #[[Has field tag::{{{tag}}}]]
|-
|-
| '''Orchard''' || [[{{{orchard}}}]]
{{#if:{{{tag|}}}|
{{!}} '''Field Tag''' {{!}}{{!}} {{{tag}}}
{{!}}-
}}
| '''Orchard''' || [[Has orchard::{{{orchard}}}]]
|-
|-
| '''Species''' || {{{species}}}
| '''Species''' || [[Has species::{{{species}}}]]
|-
|-
{{#if:{{{variety}}}|
{{#if:{{{variety|}}}|
{{!}} '''Variety''' {{!}}{{!}} [[{{{variety}}}]]
{{!}} '''Variety''' {{!}}{{!}} [[Has variety::{{{variety}}}]]
{{!}}-
{{!}}-
}}
}}
{{#if:{{{variety_dna}}}|
{{#if:{{{variety_dna|}}}|
{{!}} '''DNA ID (2024)''' {{!}}{{!}} {{{variety_dna}}}
{{!}} '''DNA ID (2024)''' {{!}}{{!}} [[Has DNA variety::{{{variety_dna}}}]]
{{!}}-
{{!}}-
}}
}}
| '''Condition''' || {{{condition}}}
| '''Condition''' || [[Has condition::{{{condition}}}]]
|-
|-
{{#if:{{{height}}}|
{{#if:{{{height|}}}|
{{!}} '''Height''' {{!}}{{!}} {{{height}}} ft
{{!}} '''Height''' {{!}}{{!}} [[Has height::{{{height}}}]] ft
{{!}}-
{{!}}-
}}
}}
{{#if:{{{diameter}}}|
{{#if:{{{diameter|}}}|
{{!}} '''Diameter''' {{!}}{{!}} {{{diameter}}} in
{{!}} '''Diameter''' {{!}}{{!}} [[Has diameter::{{{diameter}}}]] in
{{!}}-
{{!}}-
}}
}}
{{#if:{{{crown_width}}}|
{{#if:{{{diam_height|}}}|
{{!}} '''Crown Width''' {{!}}{{!}} {{{crown_width}}} ft
{{!}} '''Diam. Measured At''' {{!}}{{!}} {{{diam_height}}} in
{{!}}-
{{!}}-
}}
}}
{{#if:{{{live_crown_pct}}}|
{{#if:{{{crown_width|}}}|
{{!}} '''Live Crown''' {{!}}{{!}} {{{live_crown_pct}}}%
{{!}} '''Crown Width''' {{!}}{{!}} [[Has crown width::{{{crown_width}}}]] ft
{{!}}-
{{!}}-
}}
}}
{{#if:{{{lat}}}|
{{#if:{{{live_crown_pct|}}}|
{{!}} '''Location''' {{!}}{{!}} {{#display_map: {{{lat}}},{{{lon}}}~Tree #{{{tag}}} {{!}} zoom=17 {{!}} height=150px }}
{{!}} '''Live Crown''' {{!}}{{!}} [[Has live crown percent::{{{live_crown_pct}}}]]%
{{!}}-
{{!}}-
}}
}}
{{#if:{{{at_clarno}}}|
{{#if:{{{at_clarno|}}}|
{{!}} '''Preserved''' {{!}}{{!}} Clarno Arboretum{{#if:{{{clarno_year}}}| ({{{clarno_year}}})}}
{{!}} '''Preserved''' {{!}}{{!}} [[Is at Clarno::Yes]]{{#if:{{{clarno_year|}}}| ([[Has Clarno year::{{{clarno_year}}}]])}}
{{!}}-
{{!}}-
}}
}}
{{#if:{{{dna_code}}}|
{{#if:{{{dna_code|}}}|
{{!}} '''DNA Code''' {{!}}{{!}} {{{dna_code}}}
{{!}} '''DNA Code''' {{!}}{{!}} [[Has DNA code::{{{dna_code}}}]]
{{!}}-
{{!}}-
}}
}}
Line 47: Line 51:
</includeonly><noinclude>
</includeonly><noinclude>
{{Tree Infobox
{{Tree Infobox
|tag=1
|tag=30
|orchard=Example Orchard
|orchard=Example Orchard
|species=Apple
|species=Apple
Line 55: Line 59:
|height=25
|height=25
|diameter=18
|diameter=18
|diam_height=4
|crown_width=20
|crown_width=20
|live_crown_pct=80
|live_crown_pct=80
|lat=44.123
|lon=-121.456
|at_clarno=yes
|at_clarno=yes
|clarno_year=2025
|clarno_year=2025
Line 75: Line 78:
|height=
|height=
|diameter=
|diameter=
|diam_height=
|crown_width=
|crown_width=
|live_crown_pct=
|live_crown_pct=
|lat=
|lon=
|at_clarno=
|at_clarno=
|clarno_year=
|clarno_year=
Line 84: Line 86:
}}
}}
</pre>
</pre>
== Semantic Properties ==
This template stores data using Semantic MediaWiki properties:
* [[Property:Has orchard]] - Links to orchard page
* [[Property:Has species]] - Apple/Pear/Plum
* [[Property:Has variety]] - Links to variety page
* [[Property:Has condition]] - good/fair/poor/dead
* [[Property:Has field tag]] - Physical tag number
* [[Property:Is at Clarno]] - Preservation status
* [[Property:Has DNA code]] - DNA sample code


[[Category:Infobox templates]]
[[Category:Infobox templates]]
</noinclude>
</noinclude>

Latest revision as of 12:32, 5 February 2026

Tree #30
Field Tag 30
Orchard Example Orchard
Species Apple
Variety Golden Delicious
DNA ID (2024) Golden Delicious
Condition good
Height 25 ft
Diameter 18 in
Diam. Measured At 4 in
Crown Width 20 ft
Live Crown 80%
Preserved Yes(2025)
DNA Code AFRS-001


Usage

{{Tree Infobox
|tag=
|orchard=
|species=
|variety=
|variety_dna=
|condition=
|height=
|diameter=
|diam_height=
|crown_width=
|live_crown_pct=
|at_clarno=
|clarno_year=
|dna_code=
}}

Semantic Properties

This template stores data using Semantic MediaWiki properties: