Difference between revisions of "Template:Infobox"

From CWCki
Jump to navigation Jump to search
m (New page: {{{!}} class="infobox {{{bodyclass|}}}" cellspacing="5" style="width: 22em; text-align: left; font-size: 88%; line-height: 1.5em; {{{bodystyle|}}}"<!-- Caption -->{{#if:{{{title|}}}|<nowi...)
 
(Infobox header alignment issue resolved.)
 
(6 intermediate revisions by 3 users not shown)
Line 3: Line 3:
-->{{#if:{{{title|}}}|<nowiki/>
-->{{#if:{{{title|}}}|<nowiki/>
{{!}}+  
{{!}}+  
{{!}}class="{{{titleclass|}}}" style="font-size: 125%; font-weight: bold; {{{titlestyle|}}}"{{!}}{{{title}}} }}<!--
! colspan="2" class="{{{titleclass|}}}" style="text-align:center; font-size: 125%; {{{titlestyle|}}}"{{!}}{{{title}}} }}<!--
  Header
  Header
-->{{#if:{{{above|}}}|<nowiki/>
-->{{#if:{{{above|}}}|<nowiki/>
Line 825: Line 825:
{{!}}-
{{!}}-
{{!}}style="text-align:right;" colspan=2"{{!}}{{Tnavbar|{{{name}}}|noedit={{{noedit|0}}}}} }}
{{!}}style="text-align:right;" colspan=2"{{!}}{{Tnavbar|{{{name}}}|noedit={{{noedit|0}}}}} }}
{{!}}}
{{!}}}<noinclude>{{clear}}{{usage|1=This template is a metatemplate used to construct other templates. Each row on the table can contain either a header, or a label/data pair, or just a data cell. These are mutually exclusive states so if you define a row with both a header and a label/data pair, the label/data pair is ignored.
 
To insert an image somewhere other than at the top of the infobox, or to insert freeform data, use a row with only a data field. The format for using this template is as follows:<br />
 
'''<pre>{{infobox
| title = The Man in the Pickle Suit
| image = [[Image:Black_man_in_pickle_suit.jpg]]
|header3  = Section 1
|label5  = Label A
|data5    = Data B
|label7  = Label C
|data7    = Data C
|header10 = Section 2
|label12  = Label D
|data12  = Data D
}}</pre>'''
 
- Displays:{{infobox
| title = The Man in the Pickle Suit
| image = [[Image:Black_man_in_pickle_suit.jpg]]
|header3  = Section 1
|label5  = Label A
|data5    = Data B
|label7  = Label C
|data7    = Data C
|header10 = Section 2
|label12  = Label D
|data12  = Data D
}}
{{clear}}
}}
 
[[Category:Metatemplates|{{PAGENAME}}]][[Category:Infoboxes|{{PAGENAME}}]]</noinclude>

Latest revision as of 01:33, 8 October 2021

Usage

These usage notes will not be included in articles bearing this template.

This template is a metatemplate used to construct other templates. Each row on the table can contain either a header, or a label/data pair, or just a data cell. These are mutually exclusive states so if you define a row with both a header and a label/data pair, the label/data pair is ignored.

To insert an image somewhere other than at the top of the infobox, or to insert freeform data, use a row with only a data field. The format for using this template is as follows:

{{infobox
| title = The Man in the Pickle Suit
| image = [[Image:Black_man_in_pickle_suit.jpg]]
|header3  = Section 1
|label5   = Label A
|data5    = Data B
|label7   = Label C
|data7    = Data C
|header10 = Section 2
|label12  = Label D
|data12   = Data D
}}

- Displays:

The Man in the Pickle Suit
Black man in pickle suit.jpg
Section 1
Label A Data B
Label C Data C
Section 2
Label D Data D