Template:Plant Infobox: Difference between revisions
Appearance
Initial Template |
Fix template |
||
| Line 1: | Line 1: | ||
< | <templatestyles src="Template:Plant Infobox/styles.css" /><div class="plant-infobox"> | ||
<div class="plant-infobox-title">{{{name|Plant}}}</div>{{#if:{{{common_names|}}}|<div class="plant-infobox-subtitle">{{{common_names}}}</div>}}{{#if:{{{image|}}}|<div class="plant-infobox-image">[[File:{{{image}}}|220px]]{{#if:{{{image_caption|}}}|<br/><small>{{{image_caption}}}</small>}}</div>}}<table> | |||
{{#if:{{{species|}}}|<tr><td class="plant-label">Scientific Name</td><td>{{{species}}}</td></tr>}} | |||
{{#if:{{{location|}}}|<tr><td class="plant-label">Location</td><td>{{{location}}}</td></tr>}} | |||
{{#if:{{{date_planted|}}}|<tr><td class="plant-label">Planted</td><td>{{{date_planted|Unknown}}}</td></tr>}} | |||
{{#if:{{{type|}}}|<tr><td class="plant-label">Type</td><td>{{{type}}}</td></tr>}} | |||
{{#if:{{{sunlight|}}}|<tr><td class="plant-label">Sunlight</td><td>{{{sunlight}}}</td></tr>}} | |||
{{#if:{{{water_needs|}}}|<tr><td class="plant-label">Water Needs</td><td>{{{water_needs}}}</td></tr>}} | |||
{{#if:{{{hardiness_zone|}}}|<tr><td class="plant-label">Hardiness Zone</td><td>{{{hardiness_zone}}}</td></tr>}} | |||
{{#if:{{{notes|}}}|<tr><td colspan="2" class="plant-section">Care Notes</td></tr><tr><td colspan="2" style="padding:4px 6px;">{{{notes}}}</td></tr>}} | |||
</table></div><noinclude> | |||
{{TemplateData | {{TemplateData | ||
|description=Plant information infobox | |description=Plant information infobox for documenting garden plants | ||
|params= | |params= | ||
{ | { | ||
| Line 9: | Line 19: | ||
"type": "string", | "type": "string", | ||
"required": true | "required": true | ||
}, | |||
"common_names": { | |||
"label": "Common Names", | |||
"description": "Other common names", | |||
"type": "string" | |||
}, | }, | ||
"image": { | "image": { | ||
"label": "Image", | "label": "Image", | ||
"description": " | "description": "Image filename (without File: prefix)", | ||
"type": "wiki-file-name" | "type": "wiki-file-name" | ||
}, | |||
"image_caption": { | |||
"label": "Image Caption", | |||
"type": "string" | |||
}, | }, | ||
"species": { | "species": { | ||
"label": "Scientific Name", | "label": "Scientific Name", | ||
"description": " | "description": "Botanical/scientific name", | ||
"type": "string" | "type": "string" | ||
}, | }, | ||
"location": { | "location": { | ||
"label": "Location", | "label": "Location", | ||
"description": " | "description": "Garden location (e.g. Main Bed - North side)", | ||
"type": "string" | "type": "string" | ||
}, | }, | ||
| Line 37: | Line 51: | ||
}, | }, | ||
"type": { | "type": { | ||
"label": " | "label": "Type", | ||
"description": "perennial, annual, herb, shrub, etc.", | "description": "perennial, annual, herb, shrub, etc.", | ||
"type": "string" | "type": "string" | ||
}, | }, | ||
"sunlight": { | "sunlight": { | ||
"label": "Sunlight | "label": "Sunlight", | ||
"description": "Full sun, partial shade, etc.", | "description": "Full sun, partial shade, etc.", | ||
"type": "string" | "type": "string" | ||
| Line 57: | Line 71: | ||
}, | }, | ||
"notes": { | "notes": { | ||
"label": "Notes", | "label": "Care Notes", | ||
"description": "Additional | "description": "Additional care information", | ||
"type": "string" | "type": "string" | ||
} | } | ||
} | } | ||
}} | }} | ||
== Usage == | |||
< | <pre> | ||
{{Plant Infobox | |||
| name = Tomato | |||
| | | common_names = Tomato, Tomate | ||
| | | image = Tomato_plant.jpg | ||
| | | image_caption = Mature plant in July | ||
| | | species = Solanum lycopersicum | ||
| | | location = Main Bed - South side | ||
| date_planted = 2025-04-15 | |||
| type = Annual vegetable | |||
| sunlight = Full sun (6+ hours) | |||
|- | | water_needs = Regular, 1-2 inches per week | ||
| hardiness_zone = Annual (all zones) | |||
| notes = Heritage variety with excellent flavor. Prune suckers for better airflow. | |||
| | }} | ||
|- | </pre> | ||
| | |||
| | All parameters are optional — omit any you don't need and the row won't appear. | ||
</noinclude> | |||
Revision as of 17:52, 21 April 2026
Page Template:Plant Infobox/styles.css has no content.
Plant
Usage
{{Plant Infobox
| name = Tomato
| common_names = Tomato, Tomate
| image = Tomato_plant.jpg
| image_caption = Mature plant in July
| species = Solanum lycopersicum
| location = Main Bed - South side
| date_planted = 2025-04-15
| type = Annual vegetable
| sunlight = Full sun (6+ hours)
| water_needs = Regular, 1-2 inches per week
| hardiness_zone = Annual (all zones)
| notes = Heritage variety with excellent flavor. Prune suckers for better airflow.
}}
All parameters are optional — omit any you don't need and the row won't appear.