Jump to content

Template:InfoboxProductLine: Difference between revisions

From Consumer Rights Wiki
Attempt to create a basic infobox template
 
added short description field for browser extension
Tag: 2017 source edit
 
(37 intermediate revisions by 8 users not shown)
Line 1: Line 1:
<div style="background: #eee;border: 1px solid #aaa; float: right; margin: 0 0 1em 1em; padding: 0.5em; width: 400px;">
<includeonly><div class="infobox">
<div style="font-size: 2em; text-align: center; border-bottom: 1px solid #ccc;">{{{Title|{{PAGENAME}}}}}</div>
<div style="display:flex;gap:8px;flex-direction:column;">
{{#if:{{{Picture|}}}|<div style="text-align: center; padding-top: 1em; margin-bottom: -1em;">[[File:{{{Picture}}}|300px]]</div>}}
    <div class="infobox-title">{{{Title|{{PAGENAME}}}}}</div>
<table style="width:100%;">{{#if:{{{Release Year|}}}{{{Product Type|}}}{{{In Production|}}}{{{Official Website|}}}|<tr>  
    <div class="infobox-image">[[File:{{{Logo}}}|200px]]</div>
<th colspan=2 style="text-align: left; border-bottom: 1px solid #ccc; font-size:125%; padding-top: 1.5em;">Basic Information</th>  
    <table class="infobox-table">
</tr>}}
 
{{#if:{{{Release Year|}}}|<tr>
            <tr>  
    <th>{{nowrap|Release Year}}</th>
                <th colspan=2 class="infobox-table-caption" >Basic Information</th>  
    <td>{{{Release Year}}}</td>
            </tr>
</tr>}}{{#if:{{{Product Type|}}}|<tr>
 
    <th>{{nowrap|Product Type}}</th>
            <tr>
    <td>{{{Product Type}}}</td>
                <th>{{nowrap|Short description}}</th>
</tr>}}{{#if:{{{In Production|}}}|<tr>
                <td>{{{short_description}}}</td>
    <th>{{nowrap|In Production}}</th>
            </tr>
    <td>{{{In Production}}}</td>
 
</tr>}}{{#if:{{{Official Website|}}}|<tr>
            <tr>
    <th>{{nowrap|Official Website}}</th>
                <th>{{nowrap|Release Year}}</th>
    <td>{{{Official Website}}}</td>
                <td>{{{Release Year}}}</td>
</tr>}}
            </tr>
</table>
 
            <tr>
                <th>{{nowrap|Product Type}}</th>
                <td>{{{Product Type}}}</td>
            </tr>  
 
            <tr>
                <th>{{nowrap|In Production}}</th>
                <td>{{{In Production}}}</td>
            </tr>
            <tr>
                <th>{{nowrap|Official Website}}</th>
                <td>{{{Official Website}}}</td>
            </tr>
 
    </table>
</div>
</div>
</div></includeonly><noinclude>
== Usage ==
'''Short description:''' This appears as a browser alert when someone visits a site related to this product. Limit to 140 characters.


<noinclude>
{{InfoboxProductLine
| Title = Product Name
| short_description = Brief alert text for browser extension when users visit this product’s site
| Release Year = 2000
| Product Type = Type of product
| In Production = Yes
| Official Website = https://example.com/
| Logo = QuestionMark.svg
}}


== Usage ==
<pre>
<pre><nowiki>{{InfoboxDevice
<nowiki>
{{InfoboxProductLine
| Title =  
| Title =  
| Picture =  
| short_description =
| Release Year =  
| Release Year =  
| Leak Risk =  
| Product Type =  
| Mounting Technology =  
| In Production =  
| Capacitor Types =  
| Official Website =  
| Batteries =
| Logo =  
| Destructive Entry =  
}}
}}
</nowiki></pre>
</nowiki>
</pre>
[[Category:Styling templates]]
{{Clear}}


== Template Data ==
<templatedata>
<templatedata>
{
{
Line 42: Line 72:
"Title": {
"Title": {
"type": "string",
"type": "string",
"description": "Name of Product Line"
"description": "Name of Product Line",
"required": true
},
},
"Picture": {
"short_description": {
"type": "wiki-file-name",
"type": "string",
"description": "Photo of product or product line logo"
"description": "Appears in the browser extension when a user visits a site related to this product. Limit to 140 characters.",
"required": true
},
},
"Release Year": {
"Release Year": {
"type": "string",
"type": "string",
"description": "What year was the product/product line introduced"
"description": "What year was the product/product line introduced",
"required": true
},
},
"Product Type": {
"Product Type": {
"type": "string",
"type": "string",
"description": "Classification of product (line)",
"description": "Classification of product (line)",
"example": "Hardware, Software, Service,Laptop, Blender"
"example": "Hardware, Software, Service, Laptop, Blender",
"required": true
},
},
"In Production": {
"In Production": {
"type": "string",
"type": "string",
"description": "Determines if a product is in production currently",
"description": "Determines if a product is in production currently",
"example": "Yes, No"
"example": "Yes, No",
"required": true
},
},
"Official Website": {
"Official Website": {
"type": "string",
"type": "string",
"description": "Website of product if it exists. (use wayback machine if necessary)"
"description": "Website of product if it exists. (use wayback machine if necessary)",
"required": true
},
"Logo": {
"description": "The logo associated with this product. If there is no specific logo, use a picture of the product.",
"example": "filename.[jpg|png|svg]",
"type": "wiki-file-name",
"autovalue": "QuestionMark.svg",
"default": "QuestionMark.svg",
"required": true
}
}
},
},
"description": "This is a a simple information box to use in product line articles.\nParameters are the information displayed on the infobox."
"description": "This is a simple information box to use in product line articles. Includes structured data and a short description for external use.",
"format": "block",
"paramOrder": [
"Title",
"short_description",
"Release Year",
"Product Type",
"In Production",
"Official Website",
"Logo"
]
}
}
</templatedata>
</templatedata>
</noinclude>
</noinclude>

Latest revision as of 05:19, 12 June 2025

Usage

Short description: This appears as a browser alert when someone visits a site related to this product. Limit to 140 characters.

Product Name
Basic Information
Short description Brief alert text for browser extension when users visit this product’s site
Release Year 2000
Product Type Type of product
In Production Yes
Official Website https://example.com/

{{InfoboxProductLine
| Title = 
| short_description =
| Release Year = 
| Product Type = 
| In Production = 
| Official Website = 
| Logo = 
}}

Template Data

This is a simple information box to use in product line articles. Includes structured data and a short description for external use.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
TitleTitle

Name of Product Line

Stringrequired
short_descriptionshort_description

Appears in the browser extension when a user visits a site related to this product. Limit to 140 characters.

Stringrequired
Release YearRelease Year

What year was the product/product line introduced

Stringrequired
Product TypeProduct Type

Classification of product (line)

Example
Hardware, Software, Service, Laptop, Blender
Stringrequired
In ProductionIn Production

Determines if a product is in production currently

Example
Yes, No
Stringrequired
Official WebsiteOfficial Website

Website of product if it exists. (use wayback machine if necessary)

Stringrequired
LogoLogo

The logo associated with this product. If there is no specific logo, use a picture of the product.

Default
QuestionMark.svg
Example
filename.[jpg|png|svg]
Auto value
QuestionMark.svg
Filerequired