Template:Variety Infobox: Difference between revisions

From Heritage Apple Corps
Bot (talk | contribs)
Bot: Create infobox template
 
Bot (talk | contribs)
Replace tree_count/orchard_list with SMW queries
 
Line 4: Line 4:
| '''Species''' || {{{species}}}
| '''Species''' || {{{species}}}
|-
|-
| '''Trees Found''' || {{{tree_count}}}
| '''Trees Found''' || {{#ask: [[Has variety::{{{name}}}]] |format=count}}
|-
| '''Orchards''' || {{#ask: [[-Has orchard::<q>[[Has variety::{{{name}}}]]</q>]] |format=list |sep=, |link=all}}
|-
|-
{{#if:{{{orchard_list}}}|
{{!}} '''Orchards''' {{!}}{{!}} {{{orchard_list}}}
{{!}}-
}}
{{#if:{{{at_clarno}}}|
{{#if:{{{at_clarno}}}|
{{!}} '''Preserved''' {{!}}{{!}} Clarno Arboretum{{#if:{{{clarno_year}}}| ({{{clarno_year}}})}}
{{!}} '''Preserved''' {{!}}{{!}} Clarno Arboretum{{#if:{{{clarno_year}}}| ({{{clarno_year}}})}}
Line 19: Line 17:
|name=Golden Delicious
|name=Golden Delicious
|species=Apple
|species=Apple
|tree_count=5
|orchard_list=[[McCoin Lower]], [[Cyrus]]
|at_clarno=yes
|at_clarno=yes
|clarno_year=2025
|clarno_year=2025
Line 30: Line 26:
|name=
|name=
|species=
|species=
|tree_count=
|orchard_list=
|at_clarno=
|at_clarno=
|clarno_year=
|clarno_year=
}}
}}
</pre>
</pre>
== Semantic Queries ==
This template automatically computes:
* '''Trees Found''' — count of trees with <code><nowiki>[[Has variety::{{{name}}}]]</nowiki></code>
* '''Orchards''' — inverse query on <code>Has orchard</code> for trees of this variety


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

Latest revision as of 12:43, 6 February 2026

Golden Delicious
Species Apple
Trees Found 0
Orchards
Preserved Clarno Arboretum(2025)


Usage

{{Variety Infobox
|name=
|species=
|at_clarno=
|clarno_year=
}}

Semantic Queries

This template automatically computes:

  • Trees Found — count of trees with [[Has variety::{{{name}}}]]
  • Orchards — inverse query on Has orchard for trees of this variety