Template:Infobox: Difference between revisions
-u ndefined- (talk | contribs) m (Add category) |
-u ndefined- (talk | contribs) m (Migrate to Template:Documentation) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><div class="infobox"> | <includeonly><div class="infobox"> | ||
<div class="infobox-title">{{{title | {{#if:{{{title|}}}|<div class="infobox-title">{{{title}}}</div>}} | ||
<div class="infobox-content">{{ | <div class="infobox-content">{{ | ||
#if:{{{image|{{{image_url|}}}}}}|<div class="infobox-image">{{{image_url|[[File:{{{image}}}|250px|alt={{{image}}}]]}}}</div>}}{{ | #if:{{{image|{{{image_url|}}}}}}|<div class="infobox-image">{{{image_url|[[File:{{{image}}}|250px|alt={{{image_alt|{{{image}}}}}}]]}}}</div>}}{{ | ||
#if:{{{caption|}}}|<div class="infobox-caption">{{{caption}}}</div>}}<table class="infobox-table">{{ | #if:{{{caption|}}}|<div class="infobox-caption">{{{caption}}}</div>}}<table class="infobox-table">{{ | ||
#if:{{{header1|}}}|<tr class="infobox-header"><th colspan="2">{{{header1}}}</th></tr>}}{{ | #if:{{{header1|}}}|<tr class="infobox-header"><th colspan="2">{{{header1}}}</th></tr>}}{{ | ||
#if:{{{ | #if:{{{data1|}}}|<tr class="infobox-row">{{#if:{{{label1|}}}|<td class="infobox-label">{{{label1}}}</td>}}<td class="infobox-data" {{#if:{{{label1|}}}||colspan="2"}}>{{{data1}}}</td></tr>}}{{ | ||
#if:{{{header2|}}}|<tr class="infobox-header"><th colspan="2">{{{header2}}}</th></tr>}}{{ | #if:{{{header2|}}}|<tr class="infobox-header"><th colspan="2">{{{header2}}}</th></tr>}}{{ | ||
#if:{{{ | #if:{{{data2|}}}|<tr class="infobox-row">{{#if:{{{label2|}}}|<td class="infobox-label">{{{label2}}}</td>}}<td class="infobox-data" {{#if:{{{label2|}}}||colspan="2"}}>{{{data2}}}</td></tr>}}{{ | ||
#if:{{{header3|}}}|<tr class="infobox-header"><th colspan="2">{{{header3}}}</th></tr>}}{{ | #if:{{{header3|}}}|<tr class="infobox-header"><th colspan="2">{{{header3}}}</th></tr>}}{{ | ||
#if:{{{ | #if:{{{data3|}}}|<tr class="infobox-row">{{#if:{{{label3|}}}|<td class="infobox-label">{{{label3}}}</td>}}<td class="infobox-data" {{#if:{{{label3|}}}||colspan="2"}}>{{{data3}}}</td></tr>}}{{ | ||
#if:{{{header4|}}}|<tr class="infobox-header"><th colspan="2">{{{header4}}}</th></tr>}}{{ | #if:{{{header4|}}}|<tr class="infobox-header"><th colspan="2">{{{header4}}}</th></tr>}}{{ | ||
#if:{{{ | #if:{{{data4|}}}|<tr class="infobox-row">{{#if:{{{label4|}}}|<td class="infobox-label">{{{label4}}}</td>}}<td class="infobox-data" {{#if:{{{label4|}}}||colspan="2"}}>{{{data4}}}</td></tr>}}{{ | ||
#if:{{{header5|}}}|<tr class="infobox-header"><th colspan="2">{{{header5}}}</th></tr>}}{{ | #if:{{{header5|}}}|<tr class="infobox-header"><th colspan="2">{{{header5}}}</th></tr>}}{{ | ||
#if:{{{ | #if:{{{data5|}}}|<tr class="infobox-row">{{#if:{{{label5|}}}|<td class="infobox-label">{{{label5}}}</td>}}<td class="infobox-data" {{#if:{{{label5|}}}||colspan="2"}}>{{{data5}}}</td></tr>}}{{ | ||
#if:{{{header6|}}}|<tr class="infobox-header"><th colspan="2">{{{header6}}}</th></tr>}}{{ | #if:{{{header6|}}}|<tr class="infobox-header"><th colspan="2">{{{header6}}}</th></tr>}}{{ | ||
#if:{{{ | #if:{{{data6|}}}|<tr class="infobox-row">{{#if:{{{label6|}}}|<td class="infobox-label">{{{label6}}}</td>}}<td class="infobox-data" {{#if:{{{label6|}}}||colspan="2"}}>{{{data6}}}</td></tr>}}{{ | ||
#if:{{{header7|}}}|<tr class="infobox-header"><th colspan="2">{{{header7}}}</th></tr>}}{{ | #if:{{{header7|}}}|<tr class="infobox-header"><th colspan="2">{{{header7}}}</th></tr>}}{{ | ||
#if:{{{ | #if:{{{data7|}}}|<tr class="infobox-row">{{#if:{{{label7|}}}|<td class="infobox-label">{{{label7}}}</td>}}<td class="infobox-data" {{#if:{{{label7|}}}||colspan="2"}}>{{{data4}}}</td></tr>}}{{ | ||
#if:{{{header8|}}}|<tr class="infobox-header"><th colspan="2">{{{header8}}}</th></tr>}}{{ | #if:{{{header8|}}}|<tr class="infobox-header"><th colspan="2">{{{header8}}}</th></tr>}}{{ | ||
#if:{{{ | #if:{{{data8|}}}|<tr class="infobox-row">{{#if:{{{label8|}}}|<td class="infobox-label">{{{label8}}}</td>}}<td class="infobox-data" {{#if:{{{label8|}}}||colspan="2"}}>{{{data8}}}</td></tr>}}{{ | ||
#if:{{{header9|}}}|<tr class="infobox-header"><th colspan="2">{{{header9}}}</th></tr>}}{{ | #if:{{{header9|}}}|<tr class="infobox-header"><th colspan="2">{{{header9}}}</th></tr>}}{{ | ||
#if:{{{ | #if:{{{data9|}}}|<tr class="infobox-row">{{#if:{{{label9|}}}|<td class="infobox-label">{{{label9}}}</td>}}<td class="infobox-data" {{#if:{{{label9|}}}||colspan="2"}}>{{{data9}}}</td></tr>}}</table> | ||
</div> | </div> | ||
</div></includeonly><noinclude> | </div></includeonly><noinclude>{{Documentation}}</noinclude> | ||
{{ | |||
}} | |||
</noinclude> |
Latest revision as of 06:50, 23 August 2025
Template documentation
|
---|
Note: portions of the template sample may not be visible without values provided. |
View or edit this documentation. (About template documentation) |
Editors can experiment in this template's sandbox and test case pages. |
Description
Generic template for creating infoboxes. Please use other infoboxes when possible.
Example
{{Infobox |title=Odd Bot |image=Odd Bot.png |caption=caption |header1=header1 |label1=label1 |data1=data1 |data2=data2 }}
Parameters
Keywords, where #
is an integer from 1 to 9:
- title: Title for the infobox.
- image_url: Image to be displayed as full syntax.
- image: Name of the image. A simpler version of image_url parameter.
- image_alt: Alternative text to provide the image.
- caption: Caption for the image.
- header#.
- label#: May be omitted.
- data#.