Template:Infobox: Difference between revisions
From MicrasWiki
Jump to navigationJump to search
Undo revision 254387 by Kemal HagemaruFRP (talk) Tag: Undo |
mNo edit summary |
||
| (11 intermediate revisions by 3 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|}}}"><!-- | <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="font-size: 125% | -->{{#if:{{{title|}}}|<caption class="{{{titleclass|}}}" style="font-size: 125%; {{{titlestyle|}}}">{{{title}}}</caption>}} | ||
<!-- | <!-- | ||
Header | Header | ||
| Line 9: | Line 9: | ||
Subheader 2 | Subheader 2 | ||
-->{{#if:{{{subheader2|}}}|<tr><td colspan="2" class="{{{subheaderclass|}}}" style="text-align:center; {{{subheaderstyle|}}}">{{{subheader2}}}</td></tr>}}<!-- | -->{{#if:{{{subheader2|}}}|<tr><td colspan="2" class="{{{subheaderclass|}}}" style="text-align:center; {{{subheaderstyle|}}}">{{{subheader2}}}</td></tr>}}<!-- | ||
Subheader 3 | |||
-->{{#if:{{{subheader3|}}}|<tr><td colspan="2" class="{{{subheaderclass|}}}" style="text-align:center; {{{subheaderstyle|}}}">{{{subheader3}}}</td></tr>}}<!-- | |||
Image 1 | Image 1 | ||
-->{{#if:{{{image|{{{image1|}}}}}}|<tr><td colspan="2" class="{{{imageclass|}}}" style="text-align:center; {{{imagestyle|}}}"> {{{image|{{{image1|}}}}}} {{#if:{{{caption|{{{caption1|}}}}}}|<br /> | -->{{#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>}}<!-- | <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 | Image 2 | ||
-->{{#if:{{{image2|}}}|<tr><td colspan="2" class="{{{imageclass|}}}" style="text-align:center; {{{imagestyle|}}}"> {{{image2}}} {{#if:{{{caption2|}}}|<br /> | -->{{#if:{{{image2|}}}|<tr><td colspan="2" class="{{{imageclass|}}}" style="text-align:center; {{{imagestyle|}}}"> {{{image2}}} {{#if:{{{caption2|}}}|<br /> | ||
| Line 1,027: | Line 1,029: | ||
Navbar | Navbar | ||
-->{{#if:{{{name|}}}|<tr><td style="text-align:right;" colspan="2">{{navbar|{{{name}}}|noedit={{{noedit|0}}}}}</td></tr>}} | -->{{#if:{{{name|}}}|<tr><td style="text-align:right;" colspan="2">{{navbar|{{{name}}}|noedit={{{noedit|0}}}}}</td></tr>}} | ||
</table><noinclude>[[Category:Infobox templates|{{PAGENAME}}]]</noinclude> | </table><noinclude>{{documentation}}[[Category:Infobox templates|{{PAGENAME}}]]</noinclude> | ||
Latest revision as of 23:14, 8 May 2025
[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. |