Template:Infobox: Difference between revisions

From Hattrick
Jump to navigationJump to search
GTWeasel (talk | contribs)
mNo edit summary
GTWeasel (talk | contribs)
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{distinguish|Template:Userbox}}
<table class="infobox {{{bodyclass|}}}" cellspacing="5" style="width:22em; text-align:left; font-size:88%; line-height:1.5em; {{{bodystyle|}}}"><!--
{{Documentation subpage}}
Caption
<includeonly>{{#ifeq:{{#titleparts:{{PAGENAME}}|1|2}}|old | |{{High-risk|2900000+}}{{Lua|Module:Infobox}}}}</includeonly>
-->{{#if:{{{title|}}}|<caption class="{{{titleclass|}}}" style="font-size:125%; font-weight:bold; {{{titlestyle|}}}">{{{title}}}</caption>}}<!--
{{Parameter names example
Header
|name={{PAGENAME}} <!--|child |subbox |decat--> |title |above |subheader |subheader1 |subheader2={{{subheader2}}}<br/>......
-->{{#if:{{{above|}}}|{{Infobox/row
|image|caption |image1|caption1 |image2|caption2={{{caption2}}}<br/>......
|header={{{above}}} |headerstyle=text-align:center; font-size:125%; font-weight:bold; {{{abovestyle|}}}
|header1=<div style="border-top:1px dashed #ccc;">{{{header1}}}<br/>{{nobold|( ''or'' )}}</div>
|class={{{aboveclass|}}} |rowclass={{{aboverowclass|}}}
|label2={{{label1}}} |data2={{{data1}}}
}} }}<!--
|data3=( ''or'' ) |data4=<div style="padding-bottom:0.25em;border-bottom:1px dashed #ccc;">{{{data1}}}</div>
Subheader1
|header5={{{header2}}}<br/><div style="padding:0.75em 0 0.5em;">{{nobold|( ''or'' )}}</div>
-->{{#if:{{{subheader|}}}|{{Infobox/row
|label6={{{label2}}} |data6={{{data2}}}
|data={{{subheader}}}    |datastyle={{{subheaderstyle|}}}
|data7=( ''or'' ) |data8=<div style="padding-bottom:0.25em;border-bottom:1px dashed #ccc;">{{{data2}}}</div>
|class={{{subheaderclass|}}}  |rowclass={{{subheaderrowclass1|}}}
|data9=<div style="padding:0.75em 0 0.5em;">( ''etc'' )</div>
}} }}<!--
|below
Subheader2
}}
-->{{#if:{{{subheader2|}}}|{{Infobox/row
 
|data={{{subheader2}}}    |datastyle={{{subheaderstyle|}}}
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.
|class={{{subheaderclass|}}}  |rowclass={{{subheaderrowclass2|}}}
 
}} }}<!--
== Usage ==
Image1
Usage is similar to {{tl|navbox}}, but with an additional distinction. 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.
-->{{#if:{{{image|{{{image1|}}}}
 
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.
 
== Optional control parameters ==
; name : If this parameter is present, "view/discuss/edit" links will be

Latest revision as of 23:38, 2 September 2017

[edit] Template documentation

Template:Infobox/doc