Template:Infobox3cols/doc: Difference between revisions

From HIBIKIFORUM
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
{{template rating|p}}
{{Lua|Module:Infobox3cols}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->


This is a fork of {{tl|infobox}} which provides an option for up to three <code>data</code> attributes per row, in addition to a label: data''x''a, data''x''b and data''x''c.
This is a fork of {{tl|infobox}} which provides an option for up to three {{code|data}} attributes per row, in addition to a label: data''x''a, data''x''b and data''x''c.


{{clear}}
{{clear}}
== Usage ==
== Usage ==
<pre>
<pre>
{{Infobox3cols
{{|Infobox3cols
| child =  
  | child =  
| bodyclass =  
  | bodyclass =  
| bodystyle =  
  | bodystyle =  
| title =  
  | title =  
| titleclass =  
  | titleclass =  
| titlestyle =  
  | titlestyle =  
| above =  
  | above =  
| abovestyle =  
  | abovestyle =  
| aboveclass =  
  | aboveclass =  
| aboverowclass =  
  | aboverowclass =  
| subheader =  
  | subheader =  
| subheaderstyle =  
  | subheaderstyle =  
| subheaderclass =  
  | subheaderclass =  
| subheaderrowclass1 =  
  | subheaderrowclass1 =  
| subheader2 =  
  | subheader2 =  
| subheaderrowclass2 =  
  | subheaderrowclass2 =  
| image =  
  | image =  
| image1 =  
  | image1 =  
| caption =  
  | caption =  
| caption1 =  
  | caption1 =  
| captionstyle =  
  | captionstyle =  
| imagestyle =  
  | imagestyle =  
| imageclass =  
  | imageclass =  
| imagerowclass1 =  
  | imagerowclass1 =  
| image2 =  
  | image2 =  
| caption2 =  
  | caption2 =  
| imagerowclass2 =  
  | imagerowclass2 =  


| headerstyle =  
  | headerstyle =  
| labelstyle =  
  | labelstyle =  
| datastyle =  
  | datastyle =  
| datastylea =  
  | datastylea =  
| datastyleb =  
  | datastyleb =  
| datastylec =  
  | datastylec =  


| header1 =  
  | header1 =  
| label1 =  
  | label1 =  
| data1 =  
  | data1 =  
| data1a =  
  | data1a =  
| data1b =  
  | data1b =  
| data1c =  
  | data1c =  
| class1 =  
  | class1 =  
| rowclass1 =  
  | rowclass1 =  


| header2 =  
  | header2 =  
| rowclass2 =  
  | rowclass2 =  
| label2 =  
  | label2 =  
| data2 =  
  | data2 =  
| class2 =  
  | class2 =  
| data2a =  
  | data2a =  
| data2b =  
  | data2b =  
| class2a =  
  | class2a =  
| class2b =  
  | class2b =  
| class2c =  
  | class2c =  
| data2c =  
  | data2c =  


...
  | ...


| below =  
  | below =  
| belowstyle =  
  | belowstyle =  
| belowclass =  
  | belowclass =  
| belowrowclass =  
  | belowrowclass =  
| name =  
  | name =  
}}
}}
</pre>
</pre>


== Parameter precedence ==
== Parameter Precedence ==
The bulk of the infobox is generated by blocks of numbered parameters: <code>headerX</code>, <code>labelX</code>, <code>dataX</code>, <code>dataXa</code>, <code>dataXb</code>, and <code>dataXc</code>. The following examples demonstrate the order in which these parameters are used.
The bulk of the infobox is generated by blocks of numbered parameters: {{code|headerX}}, {{code|labelX}}, {{code|dataX}}, {{code|dataXa}}, {{code|dataXb}}, and {{code|dataXc}}. The following examples demonstrate the order in which these parameters are used.


{|
{|
Line 82: Line 81:
! Code !! Result
! Code !! Result
|- style="vertical-align:top"
|- style="vertical-align:top"
|<pre>
|
{{infobox3cols
{{tj|infobox3cols
| header1 = header1
  | header1: header1
| label1 = label1
  | label1: label1
| data1 = data1
  | data1: data1
| data1a = data1a
  | data1a: data1a
| data1b = data1b
  | data1b: data1b
| data1c = data1c
  | data1c: data1c
}}</pre>
}}
|
|
{{infobox3cols
{{infobox3cols
| header1 = header1
  | header1 = header1
| label1 = label1
  | label1 = label1
| data1 = data1
  | data1 = data1
| data1a = data1a
  | data1a = data1a
| data1b = data1b
  | data1b = data1b
| data1c = data1c
  | data1c = data1c
}}
}}
|}
|}
Line 106: Line 105:
! Code !! Result
! Code !! Result
|- style="vertical-align:top"
|- style="vertical-align:top"
|<pre>
|
{{infobox3cols
{{tj|infobox3cols
| header1 =
  | header1:
| label1 = label1
  | label1: label1
| data1 = data1
  | data1: data1
| data1a = data1a
  | data1a: data1a
| data1b = data1b
  | data1b: data1b
| data1c = data1c
  | data1c: data1c
}}</pre>
}}
|
|
{{infobox3cols
{{infobox3cols
| header1 =  
  | header1 =  
| label1 = label1
  | label1 = label1
| data1 = data1
  | data1 = data1
| data1a = data1a
  | data1a = data1a
| data1b = data1b
  | data1b = data1b
| data1c = data1c
  | data1c = data1c
}}
}}
|}
|}
Line 130: Line 129:
! Code !! Result
! Code !! Result
|- style="vertical-align:top"
|- style="vertical-align:top"
|<pre>
|
{{infobox3cols
{{tj|infobox3cols
| header1 =
  | header1:
| label1 =
  | label1:
| data1 = data1
  | data1: data1
| data1a = data1a
  | data1a: data1a
| data1b = data1b
  | data1b: data1b
| data1c = data1c
  | data1c: data1c
}}</pre>
}}
|
|
{{infobox3cols
{{infobox3cols
| header1 =  
  | header1 =  
| label1 =  
  | label1 =  
| data1 = data1
  | data1 = data1
| data1a = data1a
  | data1a = data1a
| data1b = data1b
  | data1b = data1b
| data1c = data1c
  | data1c = data1c
}}
}}
|}
|}
Line 154: Line 153:
! Code !! Result
! Code !! Result
|- style="vertical-align:top"
|- style="vertical-align:top"
|<pre>
|
{{infobox3cols
{{tj|infobox3cols
| header1 =
  | header1:
| label1 = label1
  | label1: label1
| data1 =
  | data1:
| data1a = data1a
  | data1a: data1a
| data1b = data1b
  | data1b: data1b
| data1c = data1c
  | data1c: data1c
}}</pre>
}}
|
|
{{infobox3cols
{{infobox3cols
| header1 =  
  | header1 =  
| label1 = label1
  | label1 = label1
| data1 =  
  | data1 =  
| data1a = data1a
  | data1a = data1a
| data1b = data1b
  | data1b = data1b
| data1c = data1c
  | data1c = data1c
}}
}}
|}
|}
Line 178: Line 177:
! Code !! Result
! Code !! Result
|- style="vertical-align:top"
|- style="vertical-align:top"
|<pre>
|
{{infobox3cols
{{tj|infobox3cols
| header1 =
  | header1:
| label1 = label1
  | label1: label1
| data1 =
  | data1:
| data1a =
  | data1a:
| data1b = data1b
  | data1b: data1b
| data1c = data1c
  | data1c: data1c
}}</pre>
}}
|
|
{{infobox3cols
{{infobox3cols
| header1 =  
  | header1 =  
| label1 = label1
  | label1 = label1
| data1 =  
  | data1 =  
| data1a =  
  | data1a =  
| data1b = data1b
  | data1b = data1b
| data1c = data1c
  | data1c = data1c
}}
}}
|}
|}
Line 202: Line 201:
! Code !! Result
! Code !! Result
|- style="vertical-align:top"
|- style="vertical-align:top"
|<pre>
|
{{infobox3cols
{{tj|infobox3cols
| header1 =
  | header1:
| label1 = label1
  | label1: label1
| data1 =
  | data1:
| data1a =
  | data1a:
| data1b =
  | data1b:
| data1c = data1c
  | data1c: data1c
}}</pre>
}}
|
|
{{infobox3cols
{{infobox3cols
| header1 =  
  | header1 =  
| label1 = label1
  | label1 = label1
| data1 =  
  | data1 =  
| data1a =  
  | data1a =  
| data1b =  
  | data1b =  
| data1c = data1c
  | data1c = data1c
}}
}}
|}
|}
Line 226: Line 225:
! Code !! Result
! Code !! Result
|- style="vertical-align:top"
|- style="vertical-align:top"
|<pre>
|
{{infobox3cols
{{tj|infobox3cols
| header1 =
  | header1:
| label1 =
  | label1:
| data1 =
  | data1:
| data1a = data1a
  | data1a: data1a
| data1b = data1b
  | data1b: data1b
| data1c = data1c
  | data1c: data1c
}}</pre>
}}
|
|
{{infobox3cols
{{infobox3cols
| header1 =  
  | header1 =  
| label1 =  
  | label1 =  
| data1 =  
  | data1 =  
| data1a = data1a
  | data1a = data1a
| data1b = data1b
  | data1b = data1b
| data1c = data1c
  | data1c = data1c
}}
}}
|}
|}


<includeonly>
<includeonly>{{sandbox other||{{testcases other||
 
<!-- Categories below this line, please -->
<!-- Categories below this line, please -->
[[Category:Templates]]
[[Category:Templates]]
</includeonly>
[[Category:Utility Templates]]
}}}}</includeonly>

Revision as of 06:15, 15 June 2023

Light bulb.png }}
It contains usage information, categories and other content that is not part of the original template page.

This is a fork of {{infobox}} which provides an option for up to three data attributes per row, in addition to a label: dataxa, dataxb and dataxc.

Usage

{{|Infobox3cols
  | child = 
  | bodyclass = 
  | bodystyle = 
  | title = 
  | titleclass = 
  | titlestyle = 
  | above = 
  | abovestyle = 
  | aboveclass = 
  | aboverowclass = 
  | subheader = 
  | subheaderstyle = 
  | subheaderclass = 
  | subheaderrowclass1 = 
  | subheader2 = 
  | subheaderrowclass2 = 
  | image = 
  | image1 = 
  | caption = 
  | caption1 = 
  | captionstyle = 
  | imagestyle = 
  | imageclass = 
  | imagerowclass1 = 
  | image2 = 
  | caption2 = 
  | imagerowclass2 = 

  | headerstyle = 
  | labelstyle = 
  | datastyle = 
  | datastylea = 
  | datastyleb = 
  | datastylec = 

  | header1 = 
  | label1 = 
  | data1 = 
  | data1a = 
  | data1b = 
  | data1c = 
  | class1 = 
  | rowclass1 = 

  | header2 = 
  | rowclass2 = 
  | label2 = 
  | data2 = 
  | class2 = 
  | data2a = 
  | data2b = 
  | class2a = 
  | class2b = 
  | class2c = 
  | data2c = 

  | ...

  | below = 
  | belowstyle = 
  | belowclass = 
  | belowrowclass = 
  | name = 
}}

Parameter Precedence

The bulk of the infobox is generated by blocks of numbered parameters: headerX, labelX, dataX, dataXa, dataXb, and dataXc. The following examples demonstrate the order in which these parameters are used.

Example 1
Code Result
{{infobox3cols
| header1 = header1
| label1 = label1
| data1 = data1
| data1a = data1a
| data1b = data1b
| data1c = data1c
}}
header1
Example 2
Code Result
{{infobox3cols
| header1 =
| label1 = label1
| data1 = data1
| data1a = data1a
| data1b = data1b
| data1c = data1c
}}
label1 data1
Example 3
Code Result
{{infobox3cols
| header1 =
| label1 =
| data1 = data1
| data1a = data1a
| data1b = data1b
| data1c = data1c
}}
data1
Example 4
Code Result
{{infobox3cols
| header1 =
| label1 = label1
| data1 =
| data1a = data1a
| data1b = data1b
| data1c = data1c
}}
label1 data1a data1b data1c
Example 5
Code Result
{{infobox3cols
| header1 =
| label1 = label1
| data1 =
| data1a =
| data1b = data1b
| data1c = data1c
}}
label1 data1b data1c
Example 6
Code Result
{{infobox3cols
| header1 =
| label1 = label1
| data1 =
| data1a =
| data1b =
| data1c = data1c
}}
label1 data1c
Example 7
Code Result
{{infobox3cols
| header1 =
| label1 =
| data1 =
| data1a = data1a
| data1b = data1b
| data1c = data1c
}}