Template:Infobox drink: Difference between revisions
m avoid redirect |
→top: Add ''caption1'' for ''logo_caption'' |
||
(27 intermediate revisions by 20 users not shown) | |||
Line 1: | Line 1: | ||
{{ |
{{infobox |
||
|bodyclass = hrecipe hproduct |
| bodyclass = hrecipe hproduct |
||
| title = {{{title|<includeonly>{{{name|{{PAGENAMEBASE}}}}}</includeonly>}}} |
|||
| title = {{{title|<includeonly>{{{name|{{PAGENAME}}}}}</includeonly>}}}<includeonly>{{#ifeq:{{NAMESPACE}}|{{ns:0}}|[[Category:Articles with hRecipes]][[Category:Articles with hProducts]]}}</includeonly> |
|||
| titleclass= fn ingredient |
| titleclass= fn ingredient |
||
| image1 = {{#invoke:InfoboxImage|InfoboxImage|image={{{logo|}}}|size={{{logo_size|}}}|alt={{{logo_alt|}}}|sizedefault=frameless}} |
|||
⚫ | |||
| |
| caption1= {{{logo_caption|}}} |
||
| image2 = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{{image_size|}}}|alt={{{image_alt|}}}|sizedefault=frameless}} |
|||
| caption = {{{caption|}}} |
|||
⚫ | |||
| label1 = Type |
| label1 = Type |
||
| data1 = {{{type|}}} |
| data1 = {{{type|}}} |
||
Line 16: | Line 15: | ||
| label3 = Distributor |
| label3 = Distributor |
||
| data3 = {{{distributor|}}} |
| data3 = {{{distributor|}}} |
||
| label4 = Country of origin |
| label4 = {{nowrap|{{{origin_label|Country of origin}}} }} |
||
| data4 = {{{origin|}}} |
| data4 = {{{origin|}}} |
||
| label5 = |
| label5 = Region of origin |
||
| data5 = {{{ |
| data5 = {{{region|}}} |
||
| label6 = |
| label6 = Introduced |
||
| data6 = {{{ |
| data6 = {{{introduced|{{{year|}}} }}} |
||
| label7 = |
| label7 = Discontinued |
||
| data7 = {{{ |
| data7 = {{{discontinued|{{{last_year|}}} }}} |
||
| label8 = [[Alcohol |
| label8 = {{nowrap|[[Alcohol by volume]] }} |
||
| data8 = {{{ |
| data8 = {{{abv|}}} |
||
| label9 = |
| label9 = [[Alcohol proof|Proof (US)]] |
||
| data9 = {{{colour|{{{color|}}}}}} <!-- use only one of "colour" or "color" depending on US/UK article, not both! --> |
| data9 = {{{proof|}}} |
||
| label10 = {{#if:{{{color|}}}|Color|Colour}} |
|||
| data10 = {{{colour|{{{color|}}}}}} <!-- use only one of "colour" or "color" depending on US/UK article, not both! --> |
|||
| |
| label11 = {{#if:{{{flavor|}}}|Flavor|Flavour}} |
||
| |
| data11 = {{{flavour|{{{flavor|}}}}}} <!-- use only one of "flavour" or "flavor" depending on US/UK article, not both! --> |
||
| |
| label12 = Style |
||
| |
| data12 = {{{style|}}} |
||
| |
| label13 = [[Gravity (alcoholic beverage)|Original gravity]] |
||
| |
| data13 = {{{og|}}} |
||
| |
| label14 = [[Gravity (alcoholic beverage)|Final gravity]] |
||
| |
| data14 = {{{fg|}}} |
||
| |
| label15 = [[International Bitterness Units scale|IBU scale]] |
||
| |
| data15 = {{{ibu|}}} |
||
| |
| label16 = Ingredients |
||
| |
| data16 = {{{ingredients|}}} |
||
⚫ | |||
⚫ | |||
| |
| data17 = {{{variants|}}} |
||
⚫ | |||
⚫ | |||
| |
| data18 = {{{related|}}} |
||
| label19 = Website |
|||
}}<noinclude> |
|||
| data19 = {{#if:{{{homepage|{{{website|}}}}}} |
|||
{{documentation}} |
|||
| {{#ifeq:{{{homepage|{{{website|}}}}}} | hide | | {{{homepage|{{{website|}}}}}} }} |
|||
[[Category:Soft drink infobox templates]] |
|||
| {{#if:{{wikidata|property|raw|P856}} |
|||
[[Category:Spirits infobox templates]] |
|||
| {{#invoke:WikidataIB |url2 |url={{if empty |
|||
</noinclude> |
|||
|{{#invoke:WikidataIB|getValueByLang|P856|fwd=ALL|osd=no|maxvals=1}} |
|||
|{{Wdib|P856|fwd=ALL|osd=no|maxvals=1}} |
|||
}} }} |
|||
}} |
|||
}} |
|||
}}{{#invoke:Check for unknown parameters|check|unknown={{user other|}}|preview = Page using [[Infobox drink]] with unknown parameter "_VALUE_"|ignoreblank=y |
|||
| name | logo | logo_size | logo_alt | logo_caption | image | image_size | image_alt | caption | type | abv | proof | manufacturer | brewery | distributor | region | origin | origin_label | introduced | year | discontinued | last_year | colour | color | flavor | flavour | style | og | fg | ibu | ingredients | variants | related | homepage | website }}<includeonly>{{#ifeq:{{NAMESPACE}}|{{ns:0}}|[[Category:Articles with hRecipes]][[Category:Articles with hProducts]]}}</includeonly><noinclude>{{documentation}}</noinclude> |
Latest revision as of 08:57, 10 June 2024
This template uses Lua: |
Usage
Copy and paste the infobox below into the desired article and fill in the answers after the equals (=) sign.
{{Infobox drink
| name =
| image =
| image_size =
| image_alt =
| caption =
| type =
| abv =
| proof =
| manufacturer =
| distributor =
| origin =
| introduced =
| discontinued =
| colour =
| flavour =
| ingredients =
| variants =
| related =
| website = <!-- {{url| www.example.com }} -->
| region =
}}
Parameters
All attributes are optional.
- name – This comes to the top of the box.
- image – If there's not an image available, leave the field empty.
- image_size – width in pixels
- image_alt – If an image is used, add alt text
- caption – Leave empty for no image caption.
- type – Examples include diet soda, liqueur, ice tea and soft drink.
- abv – Alcohol by volume, f.e. 17.0% (everywhere else).
- proof – Proof for alcoholic beverages (US only).
- style – Beer style.
- og – Original gravity.
- fg – Final gravity.
- ibu – International Bitterness Units scale.
- manufacturer – The main manufacturer.
- distributor – If the distributor is not also the manufacturer.
- origin – Country of first introduction or origin.
- origin_label – Use this to change "Country of origin" to something else when "country" doesn't apply
- region – Region of first introduction or origin.
- introduced – The year (or the date) when the beverage was introduced.
- discontinued – The possible year (or the date) when the beverage was discontinued.
- colour / color – The colour(s) of the beverage.
- flavour / flavor – The dominating flavour of the beverage, whether this is a hybrid or a straight flavor.
- ingredients – a list of the major ingredients of the beverage.
- variants – For any variants of the same product, such as a diet version, or a stronger tasting version.
- related – Related products in the same category, such as other diet sodas or other liqueurs in the same tier.
- website – For a link to the official website of the beverage. Use {{url}}.
- region – Region within a country of first introduction or origin.
Example
This example is taken from the Bombay Sapphire article.
Type | Gin |
---|---|
Manufacturer | Bombay Spirits Co., Ltd. |
Distributor | Bacardi |
Country of origin | England |
Introduced | 1986 |
Alcohol by volume | 40% (UK, Canada, Australia) 47% (US and export) |
Proof (US) | 80 (UK, Canada, Australia) 94 (US and export) |
Colour | Clear |
Related products | Bombay Original Dry |
Website | www |
{{Infobox drink
| name = Bombay Sapphire
| image =
| image_size = 80px
| type = [[Gin]]
| abv = 40% (UK, Canada, Australia)<br />47% (US and export)
| proof = 80 (UK, Canada, Australia)<br />94 (US and export)
| manufacturer = Bombay Spirits Co., Ltd.
| distributor = [[Bacardi]]
| origin = England
| introduced = 1986
| discontinued =
| colour = Clear
| flavour =
| variants =
| related = Bombay Original Dry
| website = {{url|http://www.bombaysapphire.com/}}
}}
Template data
TemplateData for Infobox drink
General purpose drink infobox
Parameter | Description | Type | Status | |
---|---|---|---|---|
title | title | no description | Unknown | optional |
name | name | no description | Unknown | optional |
logo | logo | no description | Unknown | optional |
logo_size | logo_size | no description | Unknown | optional |
logo_alt | logo_alt | no description | Unknown | optional |
logo_caption | logo_caption | no description | Unknown | optional |
image | image | no description | Unknown | optional |
image_size | image_size | no description | Unknown | optional |
image_alt | image_alt | no description | Unknown | optional |
caption | caption | no description | Unknown | optional |
type | type | no description | Unknown | optional |
manufacturer | manufacturer | no description | Unknown | optional |
brewery | brewery | no description | Unknown | optional |
distributor | distributor | no description | Unknown | optional |
origin_label | origin_label | no description | Unknown | optional |
origin | origin | no description | Unknown | optional |
region | region | no description | Unknown | optional |
introduced | introduced | no description | Unknown | optional |
year | year | no description | Unknown | optional |
discontinued | discontinued | no description | Unknown | optional |
last_year | last_year | no description | Unknown | optional |
abv | abv | Alcohol by volume (abbreviated as alc/vol or ABV) | Unknown | optional |
proof | proof | Alcohol proof – a measure of the content of ethanol (alcohol) in an alcoholic beverage | Unknown | optional |
color | color | no description | Unknown | optional |
colour | colour | no description | Unknown | optional |
Carbonation | carbonation | Is the drink carbonated?
| String | optional |
Caffeination | caffeination | Does the drink contain any caffeine?
| String | optional |
flavor | flavor | The dominating flavour of the beverage, whether this is a hybrid or a straight flavor | Unknown | optional |
flavour | flavour | no description | Unknown | optional |
style | style | no description | Unknown | optional |
og | og | Original gravity | Unknown | optional |
fg | fg | Final gravity | Unknown | optional |
ibu | ibu | International Bitterness Units scale | Unknown | optional |
ingredients | ingredients | no description | Unknown | optional |
variants | variants | no description | Unknown | optional |
related | related | no description | Unknown | optional |
Official website | website homepage | Link to the official website of the beverage. Use {{url}}.
| Unknown | optional |
Microformats
Product
If the product has a URL, use {{URL}} to include it.
- Classes used
The HTML classes of this microformat include:
- brand
- category
- description
- fn
- hproduct
- identifier
- listing
- photo
- price
- review
- type
- url
- value
nor collapse nested elements which use them.
Recipe
- Classes used
The HTML classes of this microformat include:
- author
- duration
- fn
- ingredient
- instructions
- nutrition
- published
- tag
- type
- yield