Difference between revisions of "Template:Infobox"
From Ava Zinn Wiki
[unchecked revision] | [unchecked revision] |
(code rework, and support two additional parameters, per talk page discussion) |
Aeverinezinn (talk | contribs) |
||
(45 intermediate revisions by 16 users not shown) | |||
Line 1: | Line 1: | ||
− | <table class="infobox {{{bodyclass|}}}" cellspacing=" | + | {{#ifeq:{{{child|}}}|yes||<table class="infobox {{{bodyclass|}}}" cellspacing="3" style="{{#ifeq:{{{subbox|}}}|yes |
+ | |padding:0; border:none; border-spacing:3px; margin:-3px; width:auto; min-width:100%; font-size:100%; clear:none; float:none; background-color:transparent; | ||
+ | |border-spacing: 3px; width:22em; | ||
+ | }} {{{bodystyle|}}}"><!-- | ||
Caption | Caption | ||
− | -->{{#if:{{{title|}}}|<caption class="{{{titleclass|}}}" style=" | + | -->{{#if:{{{title|}}}|<caption class="{{{titleclass|}}}" style="{{{titlestyle|}}}">{{{title}}}</caption>}}<!-- |
− | <!-- | ||
Header | Header | ||
− | -->{{#if:{{{above|}}}|<tr>< | + | -->{{#if:{{{above|}}}|<tr><th colspan="2" class="{{{aboveclass|}}}" style="text-align:center; font-size:125%; font-weight:bold; {{{abovestyle|}}}">{{{above}}}</th></tr>}} |
− | + | }}{{#ifeq:{{{child|}}}|yes|{{{title|}}}}}<!-- | |
− | -->{{#if:{{{subheader|{{{subheader1|}}}}}}| | + | Subheader1 |
− | + | -->{{#if:{{{subheader|{{{subheader1|}}}}}}|{{Infobox/row | |
− | -->{{#if:{{{subheader2|}}}| | + | |data={{{subheader|{{{subheader1|}}}}}} |
− | + | |datastyle={{{subheaderstyle|{{{subheaderstyle1|}}}}}} | |
− | -->{{#if:{{{image|{{{image1|}}}}}}| | + | |class={{{subheaderclass|}}} |
− | <span style="{{{captionstyle|}}}">{{{caption|{{{caption1 | + | |rowclass={{{subheaderrowclass|{{{subheaderrowclass1|}}}}}} |
− | + | }} }}<!-- | |
− | -->{{#if:{{{image2|}}}|< | + | Subheader2 |
− | <span style="{{{captionstyle|}}}">{{{ | + | -->{{#if:{{{subheader2|}}}|{{Infobox/row |
− | + | |data={{{subheader2}}} | |
+ | |datastyle={{{subheaderstyle|{{{subheaderstyle2|}}}}}} | ||
+ | |class={{{subheaderclass|}}} | ||
+ | |rowclass={{{subheaderrowclass2|}}} | ||
+ | }} }}<!-- | ||
+ | Image1 | ||
+ | -->{{#if:{{{image|{{{image1|}}}}}}|{{Infobox/row | ||
+ | |data={{{image|{{{image1}}} }}}{{#if:{{{caption|{{{caption1|}}}}}}|<br /><span style="{{{captionstyle|}}}">{{{caption|{{{caption1}}}}}}</span>}} | ||
+ | |datastyle={{{imagestyle|}}} | ||
+ | |class={{{imageclass|}}} | ||
+ | |rowclass={{{imagerowclass1|}}} | ||
+ | }} }}<!-- | ||
+ | Image2 | ||
+ | -->{{#if:{{{image2|}}}|{{Infobox/row | ||
+ | |data={{{image2}}}{{#if:{{{caption2|}}}|<br /><span style="{{{captionstyle|}}}">{{{caption2}}}</span>}} | ||
+ | |datastyle={{{imagestyle|}}} | ||
+ | |class={{{imageclass|}}} | ||
+ | |rowclass={{{imagerowclass2|}}} | ||
+ | }} }}<!-- | ||
+ | Image3 | ||
+ | -->{{#if:{{{image3|}}}|{{Infobox/row | ||
+ | |data={{{image3}}}{{#if:{{{caption3|}}}|<br /><span style="{{{captionstyle|}}}">{{{caption3}}}</span>}} | ||
+ | |datastyle={{{imagestyle|}}} | ||
+ | |class={{{imageclass|}}} | ||
+ | |rowclass={{{imagerowclass3|}}} | ||
+ | }} }}<!-- | ||
-->{{Infobox/row | -->{{Infobox/row | ||
− | + | |header={{{header1|}}} |headerstyle={{{headerstyle|}}} | |
− | + | |label={{{label1|}}} |labelstyle={{{labelstyle|}}} | |
− | + | |data={{{data1|}}} |datastyle={{{datastyle|}}} | |
− | + | |class={{{class1|}}} |rowclass={{{rowclass1|}}} | |
− | + | }}{{Infobox/row | |
− | + | |header={{{header2|}}} |headerstyle={{{headerstyle|}}} | |
− | + | |label={{{label2|}}} |labelstyle={{{labelstyle|}}} | |
− | + | |data={{{data2|}}} |datastyle={{{datastyle|}}} | |
− | + | |class={{{class2|}}} |rowclass={{{rowclass2|}}} | |
− | + | }}{{Infobox/row | |
− | + | |header={{{header3|}}} |headerstyle={{{headerstyle|}}} | |
− | + | |label={{{label3|}}} |labelstyle={{{labelstyle|}}} | |
− | + | |data={{{data3|}}} |datastyle={{{datastyle|}}} | |
− | + | |class={{{class3|}}} |rowclass={{{rowclass3|}}} | |
− | + | }}{{Infobox/row | |
− | + | |header={{{header4|}}} |headerstyle={{{headerstyle|}}} | |
− | + | |label={{{label4|}}} |labelstyle={{{labelstyle|}}} | |
− | + | |data={{{data4|}}} |datastyle={{{datastyle|}}} | |
− | + | |class={{{class4|}}} |rowclass={{{rowclass4|}}} | |
− | + | }}{{Infobox/row | |
+ | |header={{{header5|}}} |headerstyle={{{headerstyle|}}} | ||
+ | |label={{{label5|}}} |labelstyle={{{labelstyle|}}} | ||
+ | |data={{{data5|}}} |datastyle={{{datastyle| | ||
Navbar | Navbar | ||
− | -->{{#if:{{{name|}}}|<tr><td style="text-align:right | + | -->{{#if:{{{name|}}}|<tr><td colspan="2" style="text-align:right">{{navbar|{{{name}}}|mini=1}}</td></tr>}} |
− | </table> | + | {{#ifeq:{{{child|}}}|yes||</table>}}{{#switch:{{lc:{{{italic title|¬}}}}} |
− | < | + | |¬|no = <!-- no italic title --> |
− | {{ | + | ||force|yes = {{italic title|force={{#ifeq:{{lc:{{{italic title|}}}}}|force|true}}}} |
− | {{documentation}} | + | }}<includeonly>{{main other|{{#ifeq:{{{decat|}}}|yes||{{#ifeq:{{{child|}}}|yes|{{#if:{{{title|}}}|[[Category:Articles which use embedded infobox templates with the title parameter]]}}}}{{#if:{{{data1|}}}{{{data2|}}}{{{data3|}}}{{{data4|}}}{{{data5|}}}{{{data6|}}}{{{data7|}}}{{{data8|}}}{{{data9|}}}{{{data10|}}}{{{data11|}}}{{{data12|}}}{{{data13|}}}{{{data14|}}}{{{data15|}}}{{{data16|}}}{{{data17|}}}{{{data18|}}}{{{data19|}}}{{{data20|}}}{{{data21|}}}{{{data22|}}}{{{data23|}}}{{{data24|}}}{{{data25|}}}{{{data26|}}}{{{data27|}}}{{{data28|}}}{{{data29|}}}{{{data30|}}}{{{data31|}}}{{{data32|}}}{{{data33|}}}{{{data34|}}}{{{data35|}}}{{{data36|}}}{{{data37|}}}{{{data38|}}}{{{data39|}}}{{{data40|}}}{{{data41|}}}{{{data42|}}}{{{data43|}}}{{{data44|}}}{{{data45|}}}{{{data46|}}}{{{data47|}}}{{{data48|}}}{{{data49|}}}{{{data50|}}}{{{data51|}}}{{{data52|}}}{{{data53|}}}{{{data54|}}}{{{data55|}}}{{{data56|}}}{{{data57|}}}{{{data58|}}}{{{data59|}}}{{{data60|}}}{{{data61|}}}{{{data62|}}}{{{data63|}}}{{{data64|}}}{{{data65|}}}{{{data66|}}}{{{data67|}}}{{{data68|}}}{{{data69|}}}{{{data70|}}}{{{data71|}}}{{{data72|}}}{{{data73|}}}{{{data74|}}}{{{data75|}}}{{{data76|}}}{{{data77|}}}{{{data78|}}}{{{data79|}}}{{{data80|}}}{{{data81|}}}{{{data82|}}}{{{data83|}}}{{{data84|}}}{{{data85|}}}{{{data86|}}}{{{data87|}}}{{{data88|}}}{{{data89|}}}{{{data90|}}}{{{data91|}}}{{{data92|}}}{{{data93|}}}{{{data94|}}}{{{data95|}}}{{{data96|}}}{{{data97|}}}{{{data98|}}}{{{data99|}}}||[[category:articles which use infobox templates with no data rows]]}}}}}}</includeonly><noinclude>{{documentation}}</noinclude> |
− | </noinclude> |
Latest revision as of 16:16, 7 September 2018
Template documentation[create]
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |