Template:Tree Infobox: Difference between revisions
From Heritage Apple Corps
Bot: Display field tag number in infobox |
Fix optional fields showing literal {{{param}}} when empty |
||
| (2 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}}}]] | ||
|- | |- | ||
{{#if:{{{tag|}}}| | {{#if:{{{tag|}}}| | ||
| Line 6: | Line 6: | ||
{{!}}- | {{!}}- | ||
}} | }} | ||
| '''Orchard''' || [[{{{orchard}}}]] | | '''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:{{{ | {{#if:{{{diam_height|}}}| | ||
{{!}} ''' | {{!}} '''Diam. Measured At''' {{!}}{{!}} {{{diam_height}}} in | ||
{{!}}- | {{!}}- | ||
}} | }} | ||
{{#if:{{{ | {{#if:{{{crown_width|}}}| | ||
{{!}} ''' | {{!}} '''Crown Width''' {{!}}{{!}} [[Has crown width::{{{crown_width}}}]] ft | ||
{{!}}- | {{!}}- | ||
}} | }} | ||
{{#if:{{{ | {{#if:{{{live_crown_pct|}}}| | ||
{{!}} ''' | {{!}} '''Live Crown''' {{!}}{{!}} [[Has live crown percent::{{{live_crown_pct}}}]]% | ||
{{!}}- | {{!}}- | ||
}} | }} | ||
{{#if:{{{dna_code}}}| | {{#if:{{{at_clarno|}}}| | ||
{{!}} '''DNA Code''' {{!}}{{!}} {{{dna_code}}} | {{!}} '''Preserved''' {{!}}{{!}} [[Is at Clarno::Yes]]{{#if:{{{clarno_year|}}}| ([[Has Clarno year::{{{clarno_year}}}]])}} | ||
{{!}}- | |||
}} | |||
{{#if:{{{dna_code|}}}| | |||
{{!}} '''DNA Code''' {{!}}{{!}} [[Has DNA code::{{{dna_code}}}]] | |||
{{!}}- | {{!}}- | ||
}} | }} | ||
| Line 47: | Line 51: | ||
</includeonly><noinclude> | </includeonly><noinclude> | ||
{{Tree Infobox | {{Tree Infobox | ||
|tag= | |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 | ||
| Line 73: | Line 78: | ||
|height= | |height= | ||
|diameter= | |diameter= | ||
|diam_height= | |||
|crown_width= | |crown_width= | ||
|live_crown_pct= | |live_crown_pct= | ||
| Line 80: | 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:
- 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

