Template:Subinfobox bodystyle/doc
| This is a documentation subpage for Template:Subinfobox bodystyle. It may contain usage information, categories and other content that is not part of the original template page. |
__EXPECTED_UNCONNECTED_PAGE__
| This template is used on approximately 75,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
Lua error in Module:TNT at line 159: Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Uses TemplateStyles.tab.
This template provides the correct styling with which to embed an {{Infobox}} or {{Sidebar}} within another template (usually another infobox or sidebar).
Usage
with Infobox
{{Infobox/Sidebar/etc <!--(i.e. the parent template)-->
........
| dataN/contentN/etc =
{{Infobox
| bodystyle = {{subinfobox bodystyle}}
........
}}
........
}}
(Technical note: Using {{subinfobox bodystyle}} rather than Infobox's child parameter to embed an {{Infobox}} means that the outermost table used to contain the (otherwise typical stand-alone) Infobox is retained.)
with Sidebar
The |style= parameter of Template:Sidebar is deprecated. Whenever possible, use the |child=yes parameter instead (see Template:Sidebar#Nesting). Otherwise, use |templatestyles=Subinfobox bodystyle/styles.css and |class=subinfobox.
When using {{Subinfobox bodystyle/styles.css}} to embed a {{Sidebar}}, the embedded Sidebar's navbar parameter (see documentation) also needs to be set to "off" (|navbar=off):
{{[Parent template]
........
| contentN/dataN/etc =
{{Sidebar |navbar=off
| templatestyles = Subinfobox bodystyle/styles.css
| class = subinfobox
........
}}
........
}}
Examples
Infobox within Infobox
| Unknown | |
|---|---|
Some attributes
| |
| First | Unknown |
| Second | Unknown |
| Third | Unknown |
Other attributes
| |
{{Infobox
| label1 = label1
| data1 = data1
| data2 =
{{Infobox
| bodystyle = {{subinfobox bodystyle}}
| label1 = label1a
| data1 = data1a
| data2 = ''etc''
}}
| label3 = label3
| data3 = data3
| data4 = ''etc''
}}
Infobox within Sidebar
| heading1 | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| content1 | ||||||||||||||
| heading2 | ||||||||||||||
|
||||||||||||||
| heading3 | ||||||||||||||
| content3 | ||||||||||||||
| etc | ||||||||||||||
{{Sidebar
| heading1 = heading1
| content1 = content1
| heading2 = heading2
| content2 =
{{Infobox
| bodystyle = {{subinfobox bodystyle}}
| label1 = label2a
| data1 = data2a
| label2 = label2b
| data2 = data2b
| data3 = ''etc''
}}
| heading3 = heading3
| content3 = content3
| content4 = ''etc''
}}
Infobox3cols within Infobox
| Unknown | |
|---|---|
Some attributes
| |
| First | Unknown |
| Second | Unknown |
| Third | Unknown |
Other attributes
| |
{{Infobox
| label1 = label1
| data1 = data1
| data2 =
{{Infobox3cols
| bodystyle = {{subinfobox bodystyle}}
| label1 = label1a
| data1a = data1aa
| data1b = data1ab
| data1c = data1ac
| label2 = label2a
| data2a = data2aa
| data2c = data2ac
| data3 = ''etc''
}}
| label3 = label3
| data3 = data3
| data4 = ''etc''
}}
Sidebar within Sidebar
| heading1 | |||||
|---|---|---|---|---|---|
| content1 | |||||
| heading2 | |||||
|
|||||
| heading3 | |||||
| content3 | |||||
| etc |
{{Sidebar
| heading1 = heading1
| content1 = content1
| heading2 = heading2
| content2 =
{{Sidebar | child=yes
| heading1 = heading2a
| content1 = content2a
| heading2 = heading2b
| content2 = content2b
| content3 = ''etc''
}}
| heading3 = heading3
| content3 = content3
| content4 = ''etc''
}}
Collapsed Infobox within Infobox
| Unknown | |
|---|---|
Some attributes
| |
| First | Unknown |
| Second | Unknown |
| Third | Unknown |
Other attributes
| |
{{Infobox
| label1 = label1
| data1 = data1
| data2 =
{{Infobox
| bodyclass = mw-collapsible mw-collapsed
| abovestyle = font-size:88%; padding-left:2em;
| above = {{resize|114%|Collapsed information}}
| bodystyle = {{subinfobox bodystyle}}
| label1 = label1a
| data1 = data1a
| data2 = ''etc''
}}
| label3 = label3
| data3 = data3
| data4 = ''etc''
}}
TemplateData
TemplateData for Subinfobox bodystyle
This template provides the correct styling with which to embed an {{Infobox}} or {{Sidebar}} within another template (usually another infobox or sidebar).
| Parameter | Description | Type | Status | |||
|---|---|---|---|---|---|---|
| No parameters specified | ||||||