Template:Infobox: Difference between revisions
From MicrasWiki
Jump to navigationJump to search
(Created page with '{{#ifeq:{{{child|}}}|yes||<table class="infobox {{{bodyclass|}}}" cellspacing="5" style="width:22em; {{{bodystyle|}}}"><!-- Caption -->{{#if:{{{title|}}}|<caption class="{{{titl…') |
(recovery back) Tag: Manual revert |
||
(24 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
<table class="infobox {{{bodyclass|}}}" cellspacing="5" style="width: 22em; text-align: left; font-size: 88%; line-height: 1.5em; {{{bodystyle|}}}"><!-- | |||
Caption | Caption | ||
-->{{#if:{{{title|}}}|<caption class="{{{titleclass|}}}" style="{{{titlestyle|}}}">{{{title}}}</caption>}}<!-- | -->{{#if:{{{title|}}}|<caption class="{{{titleclass|}}}" style="font-size: 125%; font-weight: bold; {{{titlestyle|}}}">{{{title}}}</caption>}} | ||
<!-- | |||
Header | Header | ||
-->{{#if:{{{above|}}}|<tr>< | -->{{#if:{{{above|}}}|<tr><td colspan="2" class="{{{aboveclass|}}}" style="text-align:center; font-size: 125%; font-weight: bold; {{{abovestyle|}}}">{{{above}}}</td></tr>}}<!-- | ||
Subheader 1 | |||
-->{{#if:{{{subheader|{{{subheader1|}}}}}}|<tr><td colspan="2" class="{{{subheaderclass|}}}" style="text-align:center; {{{subheaderstyle|}}}">{{{subheader|{{{subheader1|}}}}}}</td></tr>}}<!-- | |||
-->{{#if:{{{subheader|{{{subheader1|}}}}}}| | Subheader 2 | ||
-->{{#if:{{{subheader2|}}}|<tr><td colspan="2" class="{{{subheaderclass|}}}" style="text-align:center; {{{subheaderstyle|}}}">{{{subheader2}}}</td></tr>}}<!-- | |||
Image 1 | |||
-->{{#if:{{{image|{{{image1|}}}}}}|<tr><td colspan="2" class="{{{imageclass|}}}" style="text-align:center; {{{imagestyle|}}}"> {{{image|{{{image1|}}}}}} {{#if:{{{caption|{{{caption1|}}}}}}|<br /> | |||
<span style="{{{captionstyle|}}}">{{{caption|{{{caption1|}}}}}}</span> }}</td></tr> | {{#if:{{{caption|{{{caption1|}}}}}}|<tr><td colspan="2" class="{{{imageclass|}}}" style="text-align:center; {{{imagestyle|}}}"><span style="{{{captionstyle|}}}">{{{caption|{{{caption1|}}}}}}</span> </td></tr>}}}}<!-- | |||
Image 2 | |||
-->{{#if:{{{image2|}}}|<tr><td colspan="2" class="{{{imageclass|}}}" style="text-align:center; {{{imagestyle|}}}"> {{{image2}}} {{#if:{{{caption2|}}}|<br /> | |||
-->{{#if:{{{subheader2|}}}| | <span style="{{{captionstyle|}}}">{{{caption2}}}</span> }}</td></tr>}}<!-- | ||
Image 3 | |||
-->{{#if:{{{image3|}}}|<tr><td colspan="2" class="{{{imageclass|}}}" style="text-align:center; {{{imagestyle|}}}"> {{{image3}}} {{#if:{{{caption3|}}}|<br /> | |||
<span style="{{{captionstyle|}}}">{{{caption3}}}</span> }}</td></tr>}}<!-- | |||
Image 4 | |||
-->{{#if:{{{image4|}}}|<tr><td colspan="2" class="{{{imageclass|}}}" style="text-align:center; {{{imagestyle|}}}"> {{{image4}}} {{#if:{{{caption4|}}}|<br /> | |||
<span style="{{{captionstyle|}}}">{{{caption3}}}</span> }}</td></tr>}}<!-- | |||
-->{{#if:{{{image|{{{image1|}}}}}}|{{ | |||
}} }}<!-- | |||
-->{{#if:{{{image2|}}}|{{ | |||
| | |||
|class={{{imageclass|}}} | |||
}} }}<!-- | |||
-->{{Infobox/row | -->{{Infobox/row | ||
|header = {{{header1|}}} |headerstyle = {{{headerstyle|}}} | |||
|label = {{{label1|}}} |labelstyle = {{{labelstyle|}}} | |||
|data = {{{data1|}}} |datastyle = {{{datastyle|}}} | |||
|class = {{{class1|}}} | |||
}} {{Infobox/row | |||
|header = {{{header2|}}} |headerstyle = {{{headerstyle|}}} | |||
|label = {{{label2|}}} |labelstyle = {{{labelstyle|}}} | |||
|data = {{{data2|}}} |datastyle = {{{datastyle|}}} | |||
|class = {{{class2|}}} | |||
}} {{Infobox/row | |||
|header = {{{header3|}}} |headerstyle = {{{headerstyle|}}} | |||
|label = {{{label3|}}} |labelstyle = {{{labelstyle|}}} | |||
|data = {{{data3|}}} |datastyle = {{{datastyle|}}} | |||
|class = {{{class3|}}} | |||
}} {{Infobox/row | |||
|header = {{{header4|}}} |headerstyle = {{{headerstyle|}}} | |||
|label = {{{label4|}}} |labelstyle = {{{labelstyle|}}} | |||
|data = {{{data4|}}} |datastyle = {{{datastyle|}}} | |||
|class = {{{class4|}}} | |||
}} {{Infobox/row | |||
|header = {{{header5|}}} |headerstyle = {{{headerstyle|}}} | |||
|label = {{{label5|}}} |labelstyle = {{{labelstyle|}}} | |||
|data = {{{data5|}}} |datastyle = {{{datastyle|}}} | |||
|class = {{{class5|}}} | |||
}} {{Infobox/row | |||
|header = {{{header6|}}} |headerstyle = {{{headerstyle|}}} | |||
|label = {{{label6|}}} |labelstyle = {{{labelstyle|}}} | |||
|data = {{{data6|}}} |datastyle = {{{datastyle|}}} | |||
|class = {{{class6|}}} | |||
}} {{Infobox/row | |||
|header = {{{header7|}}} |headerstyle = {{{headerstyle|}}} | |||
|label = {{{label7|}}} |labelstyle = {{{labelstyle|}}} | |||
|data = {{{data7|}}} |datastyle = {{{datastyle|}}} | |||
|class = {{{class7|}}} | |||
}} {{Infobox/row | |||
|header = {{{header8|}}} |headerstyle = {{{headerstyle|}}} | |||
|label = {{{label8|}}} |labelstyle = {{{labelstyle|}}} | |||
|data = {{{data8|}}} |datastyle = {{{datastyle|}}} | |||
|class = {{{class8|}}} | |||
}} {{Infobox/row | |||
|header = {{{header9|}}} |headerstyle = {{{headerstyle|}}} | |||
|label = {{{label9|}}} |labelstyle = {{{labelstyle|}}} | |||
|data = {{{data9|}}} |datastyle = {{{datastyle|}}} | |||
|class = {{{class9|}}} | |||
}} {{Infobox/row | |||
|header = {{{header10|}}} |headerstyle = {{{headerstyle|}}} | |||
|label = {{{label10|}}} |labelstyle = {{{labelstyle|}}} | |||
|data = {{{data10|}}} |datastyle = {{{datastyle|}}} | |||
|class = {{{class10|}}} | |||
Navbar | Navbar | ||
-->{{#if:{{{name|}}}|<tr><td | -->{{#if:{{{name|}}}|<tr><td style="text-align:right;" colspan="2">{{navbar|{{{name}}}|noedit={{{noedit|0}}}}}</td></tr>}} | ||
</table><noinclude>{{documentation}}[[Category:Infobox templates|{{PAGENAME}}]]</noinclude> | |||
Revision as of 10:07, 10 May 2024
[edit] [ ] Template documentation
This is a generic infobox that can be used as a base for creating a diverse range of infoboxes. For more information on the syntax, see Wikipedia:Template:Infobox.
Note: for any given value for (n), not all combinations of parameters are permitted. The presence of a |header(n)= will cause the corresponding |data(n)= (and |rowclass(n)= |label(n)=, see below) to be ignored; the absence of a |data(n)= will cause the corresponding |label(n)= to be ignored.
{{Infobox |name = Infobox/doc |bodystyle = |titlestyle = |abovestyle = background:#cfc; |subheaderstyle = |title = Test Infobox |above = Above text |subheader = Subheader above image |subheader2 = Second subheader |imagestyle = |captionstyle = |image = [[File:Example-serious.jpg|200px|alt=Example alt text]] |caption = Caption displayed below File:Example-serious.jpg |headerstyle = background:#ccf; |labelstyle = background:#ddf; |datastyle = |header1 = Header defined alone | label1 = | data1 = |header2 = | label2 = Label defined alone does not display (needs data, or is suppressed) | data2 = |header3 = | label3 = | data3 = Data defined alone |header4 = All three defined (header, label, data, all with same number) | label4 = does not display (same number as a header) | data4 = does not display (same number as a header) |header5 = | label5 = Label and data defined (label) | data5 = Label and data defined (data) |belowstyle = background:#ddf; |below = Below text }}
The above documentation is transcluded from Template:Infobox/doc. (edit | history) Editors can experiment in this template's sandbox (create) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |