Template:Infobox product/doc: Difference between revisions
mk |
m syntaxhighlight lang="wikitext" |
||
(36 intermediate revisions by 22 users not shown) | |||
Line 1: | Line 1: | ||
{{Documentation subpage}} |
{{Documentation subpage}} |
||
<!-- PLEASE ADD CATEGORIES |
<!-- PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE --> |
||
{{Lua|Module:Infobox|Module:InfoboxImage|Module:WikidataIB|Module:Check for unknown parameters}} |
|||
{{Uses Wikidata|P18|P31|P61|P571|P176|P856}} |
|||
== Usage == |
|||
This template can draw data from Wikidata, assuming it is defined there. Simply use <code><nowiki>{{Infobox product}}</nowiki></code>. You may also set values manually: |
|||
{{Parameter names example |
|||
| title |
|||
| logo |
|||
| logo_caption |
|||
| logo_alt |
|||
| image |
|||
| image_size |
|||
| alt |
|||
| caption |
|||
| type |
|||
| inventor |
|||
| inception |
|||
| manufacturer |
|||
| available |
|||
| current supplier |
|||
| last production |
|||
| models |
|||
| slogan |
|||
| website |
|||
| notes |
|||
}} |
|||
<syntaxhighlight lang="wikitext"> |
|||
<pre> |
|||
{{Infobox product |
|||
{{ infobox Product |
|||
| title = |
| title = |
||
| logo = |
|||
| logo_caption = |
|||
| logo_alt = |
|||
| image = |
| image = |
||
| image_size = |
|||
| alt = |
|||
| caption = |
| caption = |
||
| type = |
|||
| inventor = |
| inventor = |
||
| |
| inception = |
||
| |
| manufacturer = |
||
| available = |
| available = |
||
| current supplier = |
| current supplier = |
||
| last production = |
| last production = |
||
| models = |
|||
| slogan = |
|||
| website = |
|||
| notes = |
| notes = |
||
}} |
}} |
||
</syntaxhighlight> |
|||
</pre> |
|||
{{clear}} |
|||
== Example == |
|||
{{Infobox product |
|||
{{ infobox Product |
|||
| title = Reason washing machine |
| title = Reason washing machine |
||
| image = |
| image = |
||
| image_size = |
|||
| alt = |
|||
| caption = |
| caption = |
||
| type = [[Washing machine]] |
|||
| inventor = [[Andrew Reason]] |
| inventor = [[Andrew Reason]] |
||
| |
| inception = {{start date|2009}} |
||
| |
| manufacturer = Reason company |
||
| available = |
| available = Available |
||
| current supplier = Reason |
| current supplier = Reason |
||
| last production = |
| last production = |
||
| models = Ultra, Super |
|||
| slogan = |
|||
| website = |
|||
| notes = |
| notes = |
||
}} |
}} |
||
<syntaxhighlight lang="wikitext" style="overflow:auto;"> |
|||
<pre> |
|||
{{Infobox product |
|||
{{ infobox Product |
|||
| title = Reason washing machine |
| title = Reason washing machine |
||
| image = |
| image = |
||
| image_size = |
|||
| alt = |
|||
| caption = |
| caption = |
||
| type = [[Washing machine]] |
|||
| inventor = [[Andrew Reason]] |
| inventor = [[Andrew Reason]] |
||
| |
| inception = {{start date|2009}} |
||
| |
| manufacturer = Reason company |
||
| available = |
| available = Available |
||
| current supplier = Reason |
| current supplier = Reason |
||
| last production = |
| last production = |
||
| models = Ultra, Super |
|||
| website = |
|||
| notes = |
| notes = |
||
}} |
}} |
||
</syntaxhighlight> |
|||
</pre> |
|||
{{clear}} |
|||
=== Microformat === |
|||
== Microformats == |
|||
{{UF-hprod}} |
{{UF-hprod}} |
||
== See also == |
|||
* {{tl|Infobox brand}} |
|||
== TemplateData == |
|||
{{TemplateData header}} |
|||
<templatedata> |
|||
{ |
|||
"params": { |
|||
"title": { |
|||
"label": "Title", |
|||
"description": "The title of the product stated in the article or what the article is covering.", |
|||
"example": "Reason washing machine", |
|||
"type": "string", |
|||
"autovalue": "" |
|||
}, |
|||
"image": { |
|||
"label": "Image", |
|||
"description": "The image that reveals the product stated. Make sure that it is a valued image, as image that are deleted will not show.", |
|||
"example": "example.jpg", |
|||
"type": "wiki-file-name", |
|||
"suggested": true |
|||
}, |
|||
"image_size": { |
|||
"label": "Image size", |
|||
"description": "The size of the image. The default is 250px and must not include \"px\".", |
|||
"example": "275", |
|||
"type": "number", |
|||
"default": "250", |
|||
"autovalue": "250", |
|||
"deprecated": true, |
|||
"aliases": [ |
|||
"imagesize", |
|||
"image size" |
|||
] |
|||
}, |
|||
"alt": { |
|||
"label": "Image alternative text", |
|||
"description": "Alternative text describing the image showing the product for visually impaired readers. ", |
|||
"example": "An Earth globe, and on the left side is being walked upon by a orange-red fur fox, its own tail is on fire. ", |
|||
"type": "string", |
|||
"autovalue": "" |
|||
}, |
|||
"caption": { |
|||
"label": "Image caption", |
|||
"description": "The caption describing the image shown on the infobox. Must be concise and short, not excessively detailed.", |
|||
"example": "The sixth-generation iPod Nano.", |
|||
"type": "string" |
|||
}, |
|||
"type": { |
|||
"label": "Type", |
|||
"description": "The type of the product stated in the article. Can be verified, but must state the type of product.", |
|||
"example": "Media player", |
|||
"type": "string", |
|||
"required": true |
|||
}, |
|||
"inventor": { |
|||
"label": "Inventor", |
|||
"description": "The creator or inventor of the product.", |
|||
"example": "Reason ", |
|||
"type": "string", |
|||
"suggested": true |
|||
}, |
|||
"available": { |
|||
"label": "Available", |
|||
"description": "Whether the product is currently available.", |
|||
"example": "Yes", |
|||
"type": "string", |
|||
"suggested": true |
|||
}, |
|||
"current supplier": { |
|||
"label": "Current supplier", |
|||
"description": "The distributor or entity that is the most current supplier of this product.", |
|||
"example": "Amazon.com", |
|||
"type": "string" |
|||
}, |
|||
"last production": { |
|||
"label": "Last production date", |
|||
"description": "The date of the last known or confirmed date that the product stopped selling or discontinued.", |
|||
"example": "2016", |
|||
"type": "date" |
|||
}, |
|||
"models": { |
|||
"label": "Models", |
|||
"description": "The models of this product.", |
|||
"example": "iriver H100", |
|||
"type": "string" |
|||
}, |
|||
"url": { |
|||
"aliases": [ |
|||
"Official URL", |
|||
"website" |
|||
], |
|||
"label": "Website", |
|||
"description": "The homepage or official URL for this product. It must be at least archived or running.", |
|||
"example": "{{url|example.net}}", |
|||
"type": "url", |
|||
"suggested": true |
|||
}, |
|||
"notes": { |
|||
"label": "Notes", |
|||
"type": "string", |
|||
"description": "Additional notes" |
|||
}, |
|||
"inception": { |
|||
"label": "Inception", |
|||
"description": "The launch date of the product.", |
|||
"example": "May 2012", |
|||
"type": "date", |
|||
"suggested": true |
|||
}, |
|||
"manufacturer": { |
|||
"label": "Manufacturer", |
|||
"description": "The company or entity that manufactures this product.", |
|||
"example": "Moleskine", |
|||
"type": "string", |
|||
"autovalue": "", |
|||
"required": true |
|||
}, |
|||
"qid": {}, |
|||
"fetchwikidata": {}, |
|||
"suppressfields": {}, |
|||
"logo": { |
|||
"label": "Logo", |
|||
"type": "wiki-file-name" |
|||
}, |
|||
"product_logo": {}, |
|||
"logo_size": {}, |
|||
"logo_alt": { |
|||
"label": "Logo alt text", |
|||
"description": "Alt text for the logo", |
|||
"type": "string" |
|||
}, |
|||
"logo_caption": { |
|||
"label": "Logo caption", |
|||
"description": "Caption for display under the logo", |
|||
"type": "content" |
|||
}, |
|||
"image_upright": {}, |
|||
"onlysourced": {}, |
|||
"noicon": {}, |
|||
"launch year": {}, |
|||
"company": {}, |
|||
"slogan": { |
|||
"aliases": [ |
|||
"tagline" |
|||
], |
|||
"label": "Slogan" |
|||
}, |
|||
"Years produced": { |
|||
"description": "The years in which the product was made.", |
|||
"example": "2002 to 2012" |
|||
} |
|||
}, |
|||
"description": "An infobox for products. This is a general infobox for products that don't have an infobox for their category, and should be used for general products.", |
|||
"format": "block", |
|||
"paramOrder": [ |
|||
"title", |
|||
"image", |
|||
"logo", |
|||
"image_size", |
|||
"alt", |
|||
"caption", |
|||
"type", |
|||
"inventor", |
|||
"inception", |
|||
"manufacturer", |
|||
"available", |
|||
"current supplier", |
|||
"last production", |
|||
"models", |
|||
"url", |
|||
"notes", |
|||
"qid", |
|||
"fetchwikidata", |
|||
"suppressfields", |
|||
"product_logo", |
|||
"logo_size", |
|||
"logo_alt", |
|||
"logo_caption", |
|||
"image_upright", |
|||
"onlysourced", |
|||
"noicon", |
|||
"launch year", |
|||
"company", |
|||
"slogan", |
|||
"Years produced" |
|||
] |
|||
} |
|||
</templatedata> |
|||
{{Wikidata infoboxes}} |
|||
<includeonly> |
|||
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> |
|||
<includeonly>{{Sandbox other|| |
|||
[[mk:Шаблон:Производ]] |
|||
<!-- Categories below this line, please; interwikis at Wikidata --> |
|||
</includeonly> |
|||
[[Category:Business infobox templates|Product]] |
|||
[[Category:Technology and applied science infobox templates|Product]] |
|||
}}</includeonly> |
Latest revision as of 18:18, 28 May 2023
This is a documentation subpage for Template:Infobox product. It may contain usage information, categories and other content that is not part of the original template page. |
This template uses Lua: |
- image (P18) (see uses)
- instance of (P31) (see uses)
- discoverer or inventor (P61) (see uses)
- inception (P571) (see uses)
- manufacturer (P176) (see uses)
- official website (P856) (see uses)
Usage
[edit]This template can draw data from Wikidata, assuming it is defined there. Simply use {{Infobox product}}
. You may also set values manually:
[[File:{{{logo}}}|frameless|alt={{{logo_alt}}}]] | |
[[File:{{{image}}}|{{{image_size}}}|alt={{{alt}}}|upright=1]] | |
Type | {{{type}}} |
---|---|
Inventor | {{{inventor}}} |
Inception | {{{inception}}} |
Manufacturer | {{{manufacturer}}} |
Available | {{{available}}} |
Current supplier | {{{current supplier}}} |
Last production year | {{{last production}}} |
Models made | {{{models}}} |
Slogan | {{{slogan}}} |
Website | {{{website}}} |
Notes {{{notes}}} |
{{Infobox product
| title =
| logo =
| logo_caption =
| logo_alt =
| image =
| image_size =
| alt =
| caption =
| type =
| inventor =
| inception =
| manufacturer =
| available =
| current supplier =
| last production =
| models =
| slogan =
| website =
| notes =
}}
Example
[edit]Type | Washing machine |
---|---|
Inventor | Andrew Reason |
Inception | 2009 |
Manufacturer | Reason company |
Available | Available |
Current supplier | Reason |
Models made | Ultra, Super |
{{Infobox product
| title = Reason washing machine
| image =
| image_size =
| alt =
| caption =
| type = [[Washing machine]]
| inventor = [[Andrew Reason]]
| inception = {{start date|2009}}
| manufacturer = Reason company
| available = Available
| current supplier = Reason
| last production =
| models = Ultra, Super
| website =
| notes =
}}
Microformats
[edit]The HTML mark-up produced by this template includes an hProduct microformat that makes a product's details readily parsable by computer programs. This aids tasks such as the cataloguing of articles and maintenance of databases. For more information about the use of microformats on Wikipedia, please visit the Microformat WikiProject.
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.
See also
[edit]- {{Infobox brand}}
TemplateData
[edit]TemplateData for Infobox product
An infobox for products. This is a general infobox for products that don't have an infobox for their category, and should be used for general products.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Title | title | The title of the product stated in the article or what the article is covering.
| String | optional |
Image | image | The image that reveals the product stated. Make sure that it is a valued image, as image that are deleted will not show.
| File | suggested |
Logo | logo | no description | File | optional |
Image size | image_size imagesize image size | The size of the image. The default is 250px and must not include "px".
| Number | deprecated |
Image alternative text | alt | Alternative text describing the image showing the product for visually impaired readers.
| String | optional |
Image caption | caption | The caption describing the image shown on the infobox. Must be concise and short, not excessively detailed.
| String | optional |
Type | type | The type of the product stated in the article. Can be verified, but must state the type of product.
| String | required |
Inventor | inventor | The creator or inventor of the product.
| String | suggested |
Inception | inception | The launch date of the product.
| Date | suggested |
Manufacturer | manufacturer | The company or entity that manufactures this product.
| String | required |
Available | available | Whether the product is currently available.
| String | suggested |
Current supplier | current supplier | The distributor or entity that is the most current supplier of this product.
| String | optional |
Last production date | last production | The date of the last known or confirmed date that the product stopped selling or discontinued.
| Date | optional |
Models | models | The models of this product.
| String | optional |
Website | url Official URL website | The homepage or official URL for this product. It must be at least archived or running.
| URL | suggested |
Notes | notes | Additional notes | String | optional |
qid | qid | no description | Unknown | optional |
fetchwikidata | fetchwikidata | no description | Unknown | optional |
suppressfields | suppressfields | no description | Unknown | optional |
product_logo | product_logo | no description | Unknown | optional |
logo_size | logo_size | no description | Unknown | optional |
Logo alt text | logo_alt | Alt text for the logo | String | optional |
Logo caption | logo_caption | Caption for display under the logo | Content | optional |
image_upright | image_upright | no description | Unknown | optional |
onlysourced | onlysourced | no description | Unknown | optional |
noicon | noicon | no description | Unknown | optional |
launch year | launch year | no description | Unknown | optional |
company | company | no description | Unknown | optional |
Slogan | slogan tagline | no description | Unknown | optional |
Years produced | Years produced | The years in which the product was made.
| Unknown | optional |