Template:Plant Infobox: Difference between revisions

Use the wikipedia template instead
Fix the templatedata hopefully
Line 1: Line 1:
{{Infobox
{{Documentation subpage}}
| bodyclass = plant
<!-- Please place categories where indicated at the bottom of this page -->
{{Lua|Module:Infobox|Module:InfoboxImage|Module:Check for unknown parameters}}
{{Generic template demo |name |common_names |image |image_caption |species |type |location |date_planted |sunlight |water_needs |hardiness_zone |notes}}


| aboveclass = plant-name
This template creates an [[Help:Infoboxes|infobox]] for documenting plants in your garden.
| abovestyle = background:palegreen;color:inherit;
| above = {{{name|<includeonly>{{PAGENAME}}</includeonly>}}}


| image = {{{image|}}}
== Usage ==
| caption = {{{image_caption|}}}
Most parameters are optional. Rows only appear if you fill them in.


| labelstyle = padding-top:0.245em;line-height:1.15em;padding-right:0.5em;
<syntaxhighlight lang="wikitext" style="overflow:auto;">
| datastyle = min-width:50%;line-height:1.3em;
{{Plant Infobox
| name =
| common_names =
| image =
| image_caption =
| species =
| type =
| location =
| date_planted =
| sunlight =
| water_needs =
| hardiness_zone =
| notes =
}}
</syntaxhighlight>
 
== Parameter Reference ==


| label1 = Scientific Name
{| class="wikitable"
| class1 = species
|-
| data1 = {{{species|}}}
! Parameter !! Description !! Example
|-
| '''name''' || Common name of the plant (required) || Tomato, Rose Bush, Basil
|-
| '''common_names''' || Alternative common names || Tomate, Solanum, Garden Rose
|-
| '''image''' || Image filename or full file syntax || <nowiki>[[File:Tomato.jpg|250px]]</nowiki>
|-
| '''image_caption''' || Caption for the image || Mature plant in July
|-
| '''species''' || Scientific/botanical name || ''Solanum lycopersicum''
|-
| '''type''' || Plant type || Annual vegetable, Perennial herb, Shrub
|-
| '''location''' || Where in your garden || Main Bed - South side, Front Patio
|-
| '''date_planted''' || When planted (or "Unknown") || 2025-04-15
|-
| '''sunlight''' || Light requirements || Full sun (6+ hours), Partial shade
|-
| '''water_needs''' || Watering needs || Regular, Drought-tolerant
|-
| '''hardiness_zone''' || Cold hardiness || Zone 5-9, Annual (all zones)
|-
| '''notes''' || Care tips and observations || Heritage variety. Prune suckers regularly.
|}


| label2 = Common Names
== Examples ==
| data2 = {{{common_names|}}}


| label3 = Plant Type
{| class="wikitable"
| data3 = {{{type|}}}
| '''Simple vegetable'''
|<syntaxhighlight lang="wikitext">{{Plant Infobox
| name = Tomato
| common_names = Tomate, Love apple
| image = [[File:Tomato.jpg|250px]]
| image_caption = Mature plant bearing fruit
| species = ''Solanum lycopersicum''
| type = Annual vegetable
| location = Main Bed - South side
| date_planted = 2025-04-15
| sunlight = Full sun (6+ hours)
| water_needs = Regular, 1-2 inches per week
| hardiness_zone = Annual (all zones)
| notes = Heritage 'Brandywine' variety. Excellent flavor. Prune lower leaves for airflow.
}}</syntaxhighlight>
|{{Plant Infobox
| name = Tomato
| common_names = Tomate, Love apple
| image = [[File:Example.jpg|250px]]
| image_caption = Mature plant bearing fruit
| species = ''Solanum lycopersicum''
| type = Annual vegetable
| location = Main Bed - South side
| date_planted = 2025-04-15
| sunlight = Full sun (6+ hours)
| water_needs = Regular, 1-2 inches per week
| hardiness_zone = Annual (all zones)
| notes = Heritage 'Brandywine' variety. Excellent flavor. Prune lower leaves for airflow.
}}
|-
| '''Perennial flower (unknown planting date)'''
|<syntaxhighlight lang="wikitext">{{Plant Infobox
| name = Rose Bush
| common_names = Peace Rose, Garden Rose
| image = [[File:Rose.jpg|250px]]
| image_caption = Pink blooms in summer
| species = ''Rosa × damascena''
| type = Perennial shrub
| location = Front Patio - South-facing wall
| date_planted = Unknown
| sunlight = Full sun (6+ hours)
| water_needs = Regular, 1 inch per week
| hardiness_zone = Zones 5-9
| notes = Established plant, at least 3 years old. Fragrance excellent in mornings.
}}</syntaxhighlight>
|{{Plant Infobox
| name = Rose Bush
| common_names = Peace Rose, Garden Rose
| image = [[File:Example.jpg|250px]]
| image_caption = Pink blooms in summer
| species = ''Rosa × damascena''
| type = Perennial shrub
| location = Front Patio - South-facing wall
| date_planted = Unknown
| sunlight = Full sun (6+ hours)
| water_needs = Regular, 1 inch per week
| hardiness_zone = Zones 5-9
| notes = Established plant, at least 3 years old. Fragrance excellent in mornings.
}}
|-
| '''Herb (minimal information)'''
|<syntaxhighlight lang="wikitext">{{Plant Infobox
| name = Basil
| species = ''Ocimum basilicum''
| type = Annual herb
| location = Kitchen herb bed
| notes = Italian variety for cooking
}}</syntaxhighlight>
|{{Plant Infobox
| name = Basil
| species = ''Ocimum basilicum''
| type = Annual herb
| location = Kitchen herb bed
| notes = Italian variety for cooking
}}
|}


| label4 = Location
== See Also ==
| data4 = {{{location|}}}


| label5 = Planted
* [[Template:Plant Update]] – For logging plant progress over time
| data5 = {{{date_planted|Unknown}}}
* [[Template:Infobox]] – Base infobox template (inherited styling)


| label6 = Sunlight
== Categories ==
| data6 = {{{sunlight|}}}


| label7 = Water Needs
* {{clc|Pages using Plant Infobox}}
| data7 = {{{water_needs|}}}


| label8 = Hardiness Zone
<includeonly>
| data8 = {{{hardiness_zone|}}}
<!-- Categories below this line; please -->
[[Category:Plant infobox templates]]
</includeonly>


| data9 = {{{notes|}}}
== Template Data ==


}}<noinclude>
{{TemplateData header}}
{{TemplateData
<templatedata>
|description=Plant information infobox for documenting garden plants
|params=
{
{
   "name": {
   "description": "Infobox for documenting plants in a garden. All parameters are optional.",
    "label": "Plant Name",
  "params": {
    "description": "Common name of the plant",
    "name": {
    "type": "string",
      "label": "Plant Name",
    "required": true
      "description": "Common name of the plant",
  },
      "type": "string",
  "common_names": {
      "required": true
    "label": "Common Names",
    },
    "description": "Other common names",
    "common_names": {
    "type": "string"
      "label": "Common Names",
  },
      "description": "Alternative common names",
  "image": {
      "type": "string"
    "label": "Image",
    },
    "description": "Image filename or full file syntax",
    "image": {
    "type": "wiki-file-name"
      "label": "Image",
  },
      "description": "Image filename or full file syntax (e.g. [[File:name.jpg|250px]])",
  "image_caption": {
      "type": "wiki-file-name"
    "label": "Image Caption",
    },
    "type": "string"
    "image_caption": {
  },
      "label": "Image Caption",
  "species": {
      "description": "Caption describing the image",
    "label": "Scientific Name",
      "type": "string"
    "description": "Botanical/scientific name",
    },
    "type": "string"
    "species": {
  },
      "label": "Scientific Name",
  "type": {
      "description": "Botanical/scientific name",
    "label": "Type",
      "type": "string"
    "description": "perennial, annual, herb, shrub, etc.",
    },
    "type": "string"
    "type": {
  },
      "label": "Type",
  "location": {
      "description": "Plant type (e.g. Annual vegetable, Perennial shrub, Herb)",
    "label": "Location",
      "type": "string"
    "description": "Garden location (e.g. Main Bed - North side)",
    },
    "type": "string"
    "location": {
  },
      "label": "Location",
  "date_planted": {
      "description": "Garden location (e.g. Main Bed - South side, Front Patio)",
    "label": "Planted Date",
      "type": "string"
    "description": "Date planted or 'Unknown'",
    },
    "type": "date",
    "date_planted": {
    "default": "Unknown"
      "label": "Planted Date",
  },
      "description": "Date planted or 'Unknown'",
  "sunlight": {
      "type": "date",
    "label": "Sunlight",
      "default": "Unknown"
    "description": "Full sun, partial shade, etc.",
    },
    "type": "string"
    "sunlight": {
  },
      "label": "Sunlight",
  "water_needs": {
      "description": "Light requirements (e.g. Full sun, Partial shade)",
    "label": "Water Needs",
      "type": "string"
    "description": "Regular, drought-tolerant, etc.",
    },
    "type": "string"
    "water_needs": {
  },
      "label": "Water Needs",
  "hardiness_zone": {
      "description": "Watering requirements (e.g. Regular, Drought-tolerant)",
    "label": "Hardiness Zone",
      "type": "string"
    "description": "USDA zone or climate info",
    },
     "type": "string"
    "hardiness_zone": {
      "label": "Hardiness Zone",
      "description": "Cold hardiness or climate zone (e.g. Zone 5-9, Annual)",
      "type": "string"
    },
     "notes": {
      "label": "Care Notes",
      "description": "Additional care information, variety details, or observations",
      "type": "string"
    }
   },
   },
   "notes": {
   "format": "block"
    "label": "Care Notes",
    "description": "Additional care information",
    "type": "string"
  }
}
}
}}
</templatedata>
</noinclude>