Difference between revisions of "Template:Infobox/doc"

From ShadowHaven Reloaded
Jump to navigation Jump to search
Tag: visualeditor-wikitext
(Blanked the page)
Tags: Blanking visualeditor
 
Line 1: Line 1:
{{Documentation subpage}}
<includeonly>{{#ifeq:{{#titleparts:{{PAGENAME}}|1|2}}|old | |{{High-risk| 2800000+ }}{{Lua|Module:Infobox}}}}</includeonly>
{{Parameter names example
|name={{PAGENAME}} <!--|child |subbox |decat--> |title |above |subheader |subheader1 |subheader2={{{subheader2}}}<br/>......
|image|caption |image1|caption1 |image2|caption2={{{caption2}}}<br/>......
|header1=<div style="border-top:1px dashed #ccc;">{{{header1}}}<br/>{{nobold|( ''or'' )}}</div>
|label2={{{label1}}} |data2={{{data1}}}
|data3=( ''or'' ) |data4=<div style="padding-bottom:0.25em;border-bottom:1px dashed #ccc;">{{{data1}}}</div>
|header5={{{header2}}}<br/><div style="padding:0.75em 0 0.5em;">{{nobold|( ''or'' )}}</div>
|label6={{{label2}}} |data6={{{data2}}}
|data7=( ''or'' ) |data8=<div style="padding-bottom:0.25em;border-bottom:1px dashed #ccc;">{{{data2}}}</div>
|data9=<div style="padding:0.75em 0 0.5em;">( ''etc'' )</div>
|below
}}


This template is intended as a meta template: a template used for constructing other templates. '''Note''': In general, it is not meant for use directly in an article, but can be used on a one-off basis if required. ((Help:Infobox)) contains an introduction about the recommended content and design of infoboxes; ((Wikipedia:Manual of Style/Infoboxes)) contains additional style guidelines. See ((WP:List of infoboxes)) and ((:Category:Infobox templates)) for lists of prepared topic-specific infoboxes.
== Usage ==
== Subboxes ==
An alternative method for embedding is to use {{para|subbox|yes}}, which removes the outer border from the infobox, but preserves the interior structure.  One feature of this approach is that the parent and child boxes need not have the same structure, and the label and data fields are not aligned between the parent and child boxes because they are not in the same parent table.
{{Infobox
| headerstyle = background-color:#eee;
| labelstyle  = background-color:#eee;
| header1 = Main 1
| header2 = Main 2
|  data3 = {{Infobox | subbox = yes
    | headerstyle = background-color:#ccc;
    | labelstyle  = background-color:#ddd;
    | header1 = Sub 3-1
    | header2 = Sub 3-2
    |  label3 = Label 3-3    |  data3 = Data 3-3
  }}
|  data4 = {{Infobox | subbox = yes
    | labelstyle  = background-color:#ccc;
    |  label1 = Label 4-1    |  data1 = Data 4-1
  }}
|  label5 = Label 5 |  data5 = Data 5
| header6 = Main 6
}}
<pre style="overflow:auto">
{{Infobox
| headerstyle = background-color:#eee;
| labelstyle  = background-color:#eee;
| header1 = Main 1
| header2 = Main 2
|  data3 = {{Infobox | subbox = yes
    | headerstyle = background-color:#ccc;
    | labelstyle  = background-color:#ddd;
    | header1 = Sub 3-1
    | header2 = Sub 3-2
    |  label3 = Label 3-3    |  data3 = Data 3-3
  }}
|  data4 = {{Infobox | subbox = yes
    | labelstyle  = background-color:#ccc;
    |  label1 = Label 4-1    |  data1 = Data 4-1
  }}
|  label5 = Label 5 |  data5 = Data 5
| header6 = Main 6
}}
</pre>{{clear}}
Similar embedding techniques may be used within content parameters of some other templates generating tables (such as [[:Template:Sidebar]]) :
{{Sidebar
| navbar = off
| headingstyle = background-color:#eee;
| heading1 = Heading 1
| heading2 = Heading 2
| content3 = {{Infobox | subbox = yes
    | headerstyle = background-color:#ccc;
    | labelstyle = background-color:#ddd;
    | header1 = Sub 3-1
    | header2 = Sub 3-2
    |  label3 = Label 3-3 |  data3 = Data 3-3
  }}
| content4 = {{Infobox | subbox = yes
    | labelstyle = background-color:#ccc;
    |  label1 = Label 4-1 |  data1 = Data 4-1
  }}
| heading5 = Heading 5
}}
<pre style="overflow:auto">
{{Sidebar
| navbar = off
| headingstyle = background-color:#eee;
| heading1 = Heading 1
| heading2 = Heading 2
| content3 = {{Infobox | subbox = yes
    | headerstyle = background-color:#ccc;
    | labelstyle = background-color:#ddd;
    | header1 = Sub 3-1
    | header2 = Sub 3-2
    |  label3 = Label 3-3 |  data3 = Data 3-3
  }}
| content4 = {{Infobox | subbox = yes
    | labelstyle = background-color:#ccc;
    |  label1 = Label 4-1 |  data1 = Data 4-1
  }}
| heading5 = Heading 5
}}
</pre>{{clear}}
Note that the default padding of the parent data cell containing each subbox is still visible, so the subboxes are slightly narrower than the parent box and there's a higher vertical spacing between standard cells of the parent box than between cells of distinct subboxes.
== Full blank syntax ==
(Note: there is no limit to the number of possible rows; only 20 are given below since infoboxes larger than that will be relatively rare. Just extend the numbering as needed. The microformat "class" parameters are also omitted as they are not commonly used.)
<pre style="overflow:auto">
{{Infobox
| name          = {{subst:PAGENAME}}
| child          = {{{child|}}}
| subbox        = {{{subbox|}}}
| italic title  = {{{italic title|no}}}
| bodystyle      =
| titlestyle    =
| abovestyle    =
| subheaderstyle =
| title          =
| above          =
| subheader      =
|  imagestyle  =
| captionstyle  =
|  image        =
| caption        =
|  image2      =
| caption2      =
| headerstyle    =
|  labelstyle    =
|  datastyle    =
| header1  =
|  label1  =
|  data1  =
| header2  =
|  label2  =
|  data2  =
| header3  =
|  label3  =
|  data3  =
| header4  =
|  label4  =
|  data4  =
| header5  =
|  label5  =
|  data5  =
| header6  =
|  label6  =
|  data6  =
| header7  =
|  label7  =
|  data7  =
| header8  =
|  label8  =
|  data8  =
| header9  =
|  label9  =
|  data9  =
| header10 =
|  label10 =
|  data10 =
| header11 =
|  label11 =
|  data11 =
| header12 =
|  label12 =
|  data12 =
| header13 =
|  label13 =
|  data13 =
| header14 =
|  label14 =
|  data14 =
| header15 =
|  label15 =
|  data15 =
| header16 =
|  label16 =
|  data16 =
| header17 =
|  label17 =
|  data17 =
| header18 =
|  label18 =
|  data18 =
| header19 =
|  label19 =
|  data19 =
| header20 =
|  label20 =
|  data20 =
| belowstyle    =
| below          =
}}
</pre>{{clear}}
{{Help:Infobox/user style}}

Latest revision as of 02:27, 27 April 2020