Template:Orchard Infobox: Difference between revisions
From Heritage Apple Corps
Bot: Create infobox template |
Make tree count and species breakdown automatic using SMW queries |
||
| Line 6: | Line 6: | ||
{{!}}- | {{!}}- | ||
}} | }} | ||
| '''Tree Count''' || {{{ | | '''Tree Count''' || {{#ask: [[Has orchard::{{{name}}}]] |format=count}} | ||
|- | |||
| '''Species''' || {{#vardefine:apple_count|{{#ask: [[Has orchard::{{{name}}}]] [[Has species::Apple]] |format=count}}}}{{#vardefine:pear_count|{{#ask: [[Has orchard::{{{name}}}]] [[Has species::Pear]] |format=count}}}}{{#vardefine:plum_count|{{#ask: [[Has orchard::{{{name}}}]] [[Has species::Plum]] |format=count}}}}{{#vardefine:apricot_count|{{#ask: [[Has orchard::{{{name}}}]] [[Has species::Apricot]] |format=count}}}}{{#ifeq:{{#var:apple_count}}|0||{{#var:apple_count}} apple}}{{#ifeq:{{#var:pear_count}}|0||{{#ifeq:{{#var:apple_count}}|0||, }}{{#var:pear_count}} pear}}{{#ifeq:{{#var:plum_count}}|0||{{#ifexpr:{{#var:apple_count}}>0 or {{#var:pear_count}}>0|, }}{{#var:plum_count}} plum}}{{#ifeq:{{#var:apricot_count}}|0||{{#ifexpr:{{#var:apple_count}}>0 or {{#var:pear_count}}>0 or {{#var:plum_count}}>0|, }}{{#var:apricot_count}} apricot}} | |||
|- | |- | ||
{{#if:{{{variety_count}}}| | {{#if:{{{variety_count}}}| | ||
{{!}} '''Varieties''' {{!}}{{!}} {{{variety_count}}} identified | {{!}} '''Varieties''' {{!}}{{!}} {{{variety_count}}} identified | ||
| Line 25: | Line 23: | ||
|name=Example Orchard | |name=Example Orchard | ||
|location=Crooked River National Grassland | |location=Crooked River National Grassland | ||
|variety_count=12 | |variety_count=12 | ||
|national_register=yes | |national_register=yes | ||
| Line 37: | Line 33: | ||
|name= | |name= | ||
|location= | |location= | ||
|variety_count= | |variety_count= | ||
|national_register= | |national_register= | ||
| Line 44: | Line 38: | ||
}} | }} | ||
</pre> | </pre> | ||
'''Note:''' Tree counts and species breakdown are now calculated automatically using Semantic MediaWiki queries. You no longer need to provide tree_count or species_breakdown parameters - they will be computed from the trees that have [[Has orchard::OrchardName]] set. | |||
[[Category:Infobox templates]] | [[Category:Infobox templates]] | ||
</noinclude> | </noinclude> | ||
Revision as of 11:58, 5 February 2026
| Example Orchard | |
|---|---|
| Location | Crooked River National Grassland |
| Tree Count | 0 |
| Species | 0}}{{#vardefine:pear_count|0}}{{#vardefine:plum_count|0}}{{#vardefine:apricot_count|0}}{{#var:apple_count}} apple,{{#var:pear_count}} pearExpression error: Unrecognized punctuation character "{".{{#var:plum_count}} plumExpression error: Unrecognized punctuation character "{".{{#var:apricot_count}} apricot |
| Varieties | 12 identified |
| NRHP | Listed2015-05-26 |
Usage
{{Orchard Infobox
|name=
|location=
|variety_count=
|national_register=
|nrhp_date=
}}
Note: Tree counts and species breakdown are now calculated automatically using Semantic MediaWiki queries. You no longer need to provide tree_count or species_breakdown parameters - they will be computed from the trees that have OrchardName set.

