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.
You can also make headers automatically hide when their section is empty (has no data-row showing).
Consider this situation:
Example: header with & without data
Some attributes
First
Unknown
Second
Unknown
Third
Unknown
Other attributes
{{Infobox| title = Example: header with & without data
| headerstyle = background: lightgrey; color:inherit;
| header1 = Header1 with empty section
| label2 = label2 text | data2 =| label3 = label3 text | data3 =| label4 = label4 text | data4 =| header5 = Header5 with data below
| label6 = label6 text | data6 = Some value
| header7 = Header7 with unlabeled data8a, data8b, data8c
| label8 =| data8a = Some a value
| data8b = Some b value
| data8c = Some c value
| header9 = Header9 with unlabeled data10 below
| label10 =| data10 = Some other value
}}
If you want hide the header when no |dataN= values are present (or only unlabeled |dataNa= and/or |dataNb= and/or |dataNc=), use |autoheaders=y:
Example: header with & without data
Some attributes
First
Unknown
Second
Unknown
Third
Unknown
Other attributes
{{Infobox| title = Example: header with & without data
| headerstyle = background: lightgrey; color:inherit;
| autoheaders = y
| header1 = Header1 with empty section
| label2 = label2 text | data2 =| label3 = label3 text | data3 =| label4 = label4 text | data4 =| header5 = Header5 with data below
| label6 = label6 text | data6 = Some value
| header7 = Header7 with unlabeled data8a, data8b, data8c
| label8 =| data8a = Some a value
| data8b = Some b value
| data8c = Some c value
| header9 = Header9 with unlabeled data10 below
| label10 =| data10 = Some other value
}}
So, header1 will be shown if any of item1, item2, or item3 is defined. If none of the three parameters are defined the header won't be shown and no empty row appears before the next visible content.
Note: if the data has empty css elements, like |data=<span style="background:yellow;"></span>, this will be treated as non-empty (having data).
If |autoheaders=y but there are items that you do not want to trigger a header, place |headerX=_BLANK_. This will serve as an empty header and separate it from the subsequent items.
Example: header with & without data
Some attributes
First
Unknown
Second
Unknown
Third
Unknown
Other attributes
{{Infobox| title = Example: header with & without data
| headerstyle = background: lightgrey; color:inherit;
| autoheaders = y
| header1 = Header1 with empty section
| label2 = label2 text | data2 =| label3 = label3 text | data3 =| label4 = label4 text | data4 =| header5 = _BLANK_
| label6 = label6 text | data6 = Some value
| header7 = Header7 with unlabeled data8a, data8b, data8c
| label8 =| data8a = Some a value
| data8b = Some b value
| data8c = Some c value
| header9 = Header9 with unlabeled data10 below
| label10 =| data10 = Some other value
}}