Template:Variety Infobox: Difference between revisions
From Heritage Apple Corps
Bot: Create infobox template |
Replace tree_count/orchard_list with SMW queries |
||
| Line 4: | Line 4: | ||
| '''Species''' || {{{species}}} | | '''Species''' || {{{species}}} | ||
|- | |- | ||
| '''Trees Found''' || {{{ | | '''Trees Found''' || {{#ask: [[Has variety::{{{name}}}]] |format=count}} | ||
|- | |||
| '''Orchards''' || {{#ask: [[-Has orchard::<q>[[Has variety::{{{name}}}]]</q>]] |format=list |sep=, |link=all}} | |||
|- | |- | ||
{{#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 | ||
|at_clarno=yes | |at_clarno=yes | ||
|clarno_year=2025 | |clarno_year=2025 | ||
| Line 30: | Line 26: | ||
|name= | |name= | ||
|species= | |species= | ||
|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 orchardfor trees of this variety

