Difference between revisions of "Template:Infobox pepper/sandbox"
Jump to navigation
Jump to search
imported>Falconjh |
imported>Uzume (sync) |
||
Line 1: | Line 1: | ||
− | {{ | + | {{ infobox |
| child = {{lc:{{{embed}}}}} | | child = {{lc:{{{embed}}}}} | ||
+ | | above = {{#ifeq:{{lc:{{{embed}}}}}|yes||{{#if:{{{name|}}} |{{{name}}} |<includeonly>{{PAGENAMEBASE}}</includeonly>}}}} | ||
− | + | | image = {{#if:{{{image|}}}|{{#ifexpr:{{#switch:{{lc:{{{image}}} }} | |
− | |||
− | | image = {{#if:{{{image|}}}| {{#ifexpr:{{#switch:{{lc:{{{image | ||
| chilli05.jpg | | chilli05.jpg | ||
| chilli15.jpg | | chilli15.jpg | ||
Line 12: | Line 11: | ||
| chilli55.jpg = 0 | | chilli55.jpg = 0 | ||
| #default = 1 | | #default = 1 | ||
− | }} | {{#invoke:InfoboxImage|InfoboxImage |image= {{{image|}}}|size={{{image_size|}}} |sizedefault=frameless |alt={{{ | + | }}|{{#invoke:InfoboxImage|InfoboxImage |image= {{{image|}}}|size={{{image_size|}}} |sizedefault=frameless |alt={{{alt|}}} }} }} }} |
| caption = {{{caption|}}} | | caption = {{{caption|}}} | ||
− | + | | label1 = Heat | |
− | | | + | | data1 = {{#if:{{{heat|}}}|{{#switch:{{lc:{{{heat}}} }} |
− | + | | mild = [[file:chilli05.svg|100x15px|alt=]] Mild | |
− | + | | low = [[file:chilli15.svg|100x15px|alt=]] Low | |
− | + | | medium = [[file:chilli25.svg|100x15px|alt=]] Medium | |
− | + | | hot = [[file:chilli35.svg|100x15px|alt=]] Hot | |
− | + | | very hot = [[file:chilli45.svg|100x15px|alt=]] Very hot | |
− | + | | exceptionally hot = [[file:chilli55.svg|100x15px|alt=]] Exceptionally hot | |
− | | | + | | hottest = [[file:chilli55.svg|100x15px|alt=]] Hottest |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | {{#if: {{{heat|}}}|{{#switch:{{lc:{{{heat}}} }} | ||
− | | mild = [[file:chilli05. | ||
− | | low = [[file:chilli15. | ||
− | | medium = [[file:chilli25. | ||
− | | hot = [[file:chilli35. | ||
− | | very hot = [[file:chilli45. | ||
− | | exceptionally hot = [[file:chilli55. | ||
− | | hottest = [[file:chilli55. | ||
| #default = {{{heat}}} | | #default = {{{heat}}} | ||
}}|{{#switch:{{lc:{{{image|}}} }} | }}|{{#switch:{{lc:{{{image|}}} }} | ||
− | | chilli05.jpg = [[file:chilli05. | + | | chilli05.jpg = [[file:chilli05.svg|100x15px|alt=]] Mild |
− | | chilli15.jpg = [[file:chilli15. | + | | chilli15.jpg = [[file:chilli15.svg|100x15px|alt=]] Low |
− | | chilli25.jpg = [[file:chilli25. | + | | chilli25.jpg = [[file:chilli25.svg|100x15px|alt=]] Medium |
− | | chilli35.jpg = [[file:chilli35. | + | | chilli35.jpg = [[file:chilli35.svg|100x15px|alt=]] Hot |
− | | chilli45.jpg = [[file:chilli45. | + | | chilli45.jpg = [[file:chilli45.svg|100x15px|alt=]] Very hot |
− | | chilli55.jpg = [[file:chilli55. | + | | chilli55.jpg = [[file:chilli55.svg|100x15px|alt=]] Exceptionally hot |
| #default = {{{image|}}} | | #default = {{{image|}}} | ||
+ | }} | ||
}} | }} | ||
− | }} | + | | label2 = [[Scoville scale]] |
− | }} | + | | data2 = {{{scoville|}}} {{#if:{{{scoville|}}}| SHU|}} |
− | + | }}<noinclude>{{documentation}}<!-- please place category and language links on the /doc sub-page. not here --></noinclude> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | <noinclude> | ||
− | {{ | ||
− | </noinclude> |
Latest revision as of 07:28, 24 April 2020
![]() | This is the template sandbox page for Template:Infobox pepper (diff). See also the companion subpage for test cases. |
This template can be used to show the heat of chilies, hot sauce, or anything that calls for a rating on the Scoville scale.
Usage
Copy and paste the following:
Template:Parameter names example
{{Infobox pepper | name = | image = | caption = | alt = | heat = | scoville = }}
Parameters
All attributes are optional.
name
- The name of the subject. If this is omitted then it will be inferred from the page name.
image
- An image of the subject. (note that this was previously used to show a "chilli rating" for the heat: this usage is deprecated, as it is covered by the
heat
parameter. caption
- A caption for the image.
alt
- alt text for the image.
heat
- How hot the subject is. This can hold any value, but there are some special cases which will automatically present the subject with a "chilli rating" image:
heat = Mild
orheat = mild
: in terms of chilli peppers, this would suit a Scoville rating between 0-999.heat = Low
orheat = low
: in terms of chilli peppers, this would suit a Scoville rating between 1,000-3,999.heat = Medium
orheat = medium
: in terms of chilli peppers, this would suit a Scoville rating between 4,000-9,999.heat = Hot
orheat = hot
: in terms of chilli peppers, this would suit a Scoville rating between 9,999-49,999.heat = Very Hot
orheat = very hot
: in terms of chilli peppers, this would suit a Scoville rating between 50,000-250,000.heat = Exceptionally Hot
orheat = exceptionally hot
in terms of chilli peppers, this would suit a Scoville rating of 250,000+.
scoville
- freeform field for giving an approximate Scoville rating for the subject's heat.
Template Data
This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.
TemplateData for Infobox pepper
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Embed | embed | no description | Unknown | optional |
Name | name | no description | Unknown | optional |
Image | image | no description | Unknown | optional |
Image_size | image_size | no description | Unknown | optional |
Alt | alt | no description | Unknown | optional |
Caption | caption | no description | Unknown | optional |
Heat | heat | no description | Unknown | optional |
Scoville | scoville | no description | Unknown | optional |
The above documentation is transcluded from Template:Infobox pepper/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |