Template:Plant Infobox: Difference between revisions

Initial Template
 
Fix accidentially used doc page content
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#if:{{{name|}}}|[[Category:Garden Plants]]}}</includeonly><noinclude>
{{Infobox
{{TemplateData
| bodyclass = plant
|description=Plant information infobox with metadata for visual editor
 
|params=
| aboveclass = plant-name
| abovestyle = background:palegreen;color:inherit;
| above = {{{name|<includeonly>{{PAGENAME}}</includeonly>}}}
 
| image = {{{image|}}}
| caption = {{{image_caption|}}}
 
| labelstyle = padding-top:0.245em;line-height:1.15em;padding-right:0.5em;
| datastyle = min-width:50%;line-height:1.3em;
 
| label1 = Scientific Name
| class1 = species
| data1 = {{{species|}}}
 
| label2 = Common Names
| data2 = {{{common_names|}}}
 
| label3 = Plant Type
| data3 = {{{type|}}}
 
| label4 = Location
| data4 = {{{location|}}}
 
| label5 = Planted
| data5 = {{{date_planted|Unknown}}}
 
| label6 = Sunlight
| data6 = {{{sunlight|}}}
 
| label7 = Water Needs
| data7 = {{{water_needs|}}}
 
| label8 = Hardiness Zone
| data8 = {{{hardiness_zone|}}}
 
| data9 = {{{notes|}}}
 
}}<noinclude>
{{Documentation}}
 
<templatedata>
{
{
   "name": {
   "description": "Infobox for plant cultivars and garden documentation",
    "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",
      "required": true
    },
    "image": {
      "label": "Image",
      "description": "Image filename (without File: prefix)",
      "type": "wiki-file-name",
      "suggested": true
    },
    "image_caption": {
      "label": "Image Caption",
      "description": "Caption for the image",
      "type": "string"
    },
    "species": {
      "label": "Scientific Name",
      "description": "Botanical/scientific name",
      "type": "string"
    },
    "common_names": {
      "label": "Common Names",
      "description": "Other common names",
      "type": "string"
    },
    "type": {
      "label": "Plant Type",
      "description": "perennial, annual, herb, shrub, etc.",
      "type": "string"
    },
    "location": {
      "label": "Location",
      "description": "Garden location (e.g. Main Bed - North side)",
      "type": "string"
    },
    "date_planted": {
      "label": "Planted Date",
      "description": "Date planted or 'Unknown'",
      "type": "date"
    },
    "sunlight": {
      "label": "Sunlight",
      "description": "Full sun, partial shade, etc.",
      "type": "string"
    },
     "water_needs": {
      "label": "Water Needs",
      "description": "Regular, drought-tolerant, etc.",
      "type": "string"
    },
     "hardiness_zone": {
      "label": "Hardiness Zone",
      "description": "USDA zone or climate info",
      "type": "string"
    },
    "notes": {
      "label": "Care Notes",
      "description": "Additional care information",
      "type": "string"
    }
   },
   },
   "image": {
   "format": "block"
    "label": "Image",
    "description": "Plant photo - use [[File:name.jpg|250px]]",
    "type": "wiki-file-name"
  },
  "species": {
    "label": "Scientific Name",
    "description": "Scientific/botanical name (e.g. Solanum lycopersicum)",
    "type": "string"
  },
  "common_names": {
    "label": "Common Names",
    "description": "Other common names for the plant",
    "type": "string"
  },
  "location": {
    "label": "Location",
    "description": "Where in the garden (e.g. Main Bed - North side)",
    "type": "string"
  },
  "date_planted": {
    "label": "Planted Date",
    "description": "Date planted or 'Unknown'",
    "type": "date",
    "default": "Unknown"
  },
  "type": {
    "label": "Plant Type",
    "description": "perennial, annual, herb, shrub, etc.",
    "type": "string"
  },
  "sunlight": {
    "label": "Sunlight Requirements",
    "description": "Full sun, partial shade, etc.",
    "type": "string"
  },
  "water_needs": {
    "label": "Water Needs",
    "description": "Regular, drought-tolerant, etc.",
    "type": "string"
  },
  "hardiness_zone": {
    "label": "Hardiness Zone",
    "description": "USDA zone or climate info",
    "type": "string"
  },
  "notes": {
    "label": "Notes",
    "description": "Additional notes about the plant",
    "type": "string"
  }
}
}
}}
</templatedata>
This template creates a plant information infobox with visual editor support.
</noinclude>
Usage: {{Plant Infobox|name=|species=|location=|date_planted=|...}}
</noinclude>{| class="infobox plant-infobox"
|-
! colspan="2" class="plant-infobox-header" | <big>{{{name|Plant Name}}}</big>
|-
| style="text-align:center" colspan="2" | {{{image|[[File:Example.jpg|250px]]}}}
|-
| '''Scientific Name:''' || {{{species|-}}}
|-
| '''Common Names:''' || {{{common_names|-}}}
|-
| '''Location:''' || {{{location|-}}}
|-
| '''Planted:''' || {{{date_planted|Unknown}}}
|-
| '''Type:''' || {{{type|}}}<br/>''(perennial, annual, herb, etc.)''
|-
| '''Sunlight:''' || {{{sunlight|-}}}
|-
| '''Water Needs:''' || {{{water_needs|-}}}
|-
| '''Zone/Climate:''' || {{{hardiness_zone|-}}}
|-
| '''Notes:''' || {{{notes|-}}}
|}