Module:Infobox3cols/doc: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{Module | {{Documentation subpage}} | ||
{{Lua|Module:Navbar|Module:Italic title| Module:Check for unknown parameters }} | |||
{{Uses TemplateStyles|Module:Infobox/styles.css|Template:Plainlist/styles.css|Template:Hlist/styles.css}} | |||
''' | 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. | ||
<includeonly> | {{clear}} | ||
<!-- Categories | == Usage == | ||
<pre> | |||
{{#invoke:infobox3cols|infoboxTemplate | |||
| 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 = | |||
| extracellstyles = 1,3a,4b=... | |||
| header1 = | |||
| label1 = | |||
| data1 = | |||
| data1a = | |||
| data1b = | |||
| data1c = | |||
| class1 = | |||
| rowclass1 = | |||
| header2 = | |||
| rowclass2 = | |||
| label2 = | |||
| data2 = | |||
| class2 = | |||
| data2a = | |||
| data2b = | |||
| class2a = | |||
| class2b = | |||
| class2c = | |||
| data2c = | |||
... | |||
| below = | |||
| belowstyle = | |||
| belowclass = | |||
| belowrowclass = | |||
| name = | |||
}} | |||
</pre> | |||
== Parameter Precedence == | |||
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. | |||
{| | |||
|+ Example 1 | |||
! Code !! Result | |||
|- style="vertical-align:top" | |||
|{{#tag:pre|{{((}}{{#ifeq:{{NAMESPACE}}|Module|#invoke:infobox3cols|infoboxTemplate|Infobox3cols}} | |||
{{!}} header1 = header1 | |||
{{!}} label1 = label1 | |||
{{!}} data1 = data1 | |||
{{!}} data1a = data1a | |||
{{!}} data1b = data1b | |||
{{!}} data1c = data1c | |||
{{))}}}} | |||
| | |||
{{#invoke:infobox3cols|infoboxTemplate | |||
| header1 = header1 | |||
| label1 = label1 | |||
| data1 = data1 | |||
| data1a = data1a | |||
| data1b = data1b | |||
| data1c = data1c | |||
}} | |||
|} | |||
{| | |||
|+ Example 2 | |||
! Code !! Result | |||
|- style="vertical-align:top" | |||
|{{#tag:pre|{{((}}{{#ifeq:{{NAMESPACE}}|Module|#invoke:infobox3cols|infoboxTemplate|Infobox3cols}} | |||
{{!}} header1 = | |||
{{!}} label1 = label1 | |||
{{!}} data1 = data1 | |||
{{!}} data1a = data1a | |||
{{!}} data1b = data1b | |||
{{!}} data1c = data1c | |||
{{))}}}} | |||
| | |||
{{#invoke:infobox3cols|infoboxTemplate | |||
| header1 = | |||
| label1 = label1 | |||
| data1 = data1 | |||
| data1a = data1a | |||
| data1b = data1b | |||
| data1c = data1c | |||
}} | |||
|} | |||
{| | |||
|+ Example 3 | |||
! Code !! Result | |||
|- style="vertical-align:top" | |||
|{{#tag:pre|{{((}}{{#ifeq:{{NAMESPACE}}|Module|#invoke:infobox3cols|infoboxTemplate|Infobox3cols}} | |||
{{!}} header1 = | |||
{{!}} label1 = | |||
{{!}} data1 = data1 | |||
{{!}} data1a = data1a | |||
{{!}} data1b = data1b | |||
{{!}} data1c = data1c | |||
{{))}}}} | |||
| | |||
{{#invoke:infobox3cols|infoboxTemplate | |||
| header1 = | |||
| label1 = | |||
| data1 = data1 | |||
| data1a = data1a | |||
| data1b = data1b | |||
| data1c = data1c | |||
}} | |||
|} | |||
{| | |||
|+ Example 4 | |||
! Code !! Result | |||
|- style="vertical-align:top" | |||
|{{#tag:pre|{{((}}{{#ifeq:{{NAMESPACE}}|Module|#invoke:infobox3cols|infoboxTemplate|Infobox3cols}} | |||
{{!}} header1 = | |||
{{!}} label1 = label1 | |||
{{!}} data1 = | |||
{{!}} data1a = data1a | |||
{{!}} data1b = data1b | |||
{{!}} data1c = data1c | |||
{{))}}}} | |||
| | |||
{{#invoke:infobox3cols|infoboxTemplate | |||
| header1 = | |||
| label1 = label1 | |||
| data1 = | |||
| data1a = data1a | |||
| data1b = data1b | |||
| data1c = data1c | |||
}} | |||
|} | |||
{| | |||
|+ Example 5 | |||
! Code !! Result | |||
|- style="vertical-align:top" | |||
|{{#tag:pre|{{((}}{{#ifeq:{{NAMESPACE}}|Module|#invoke:infobox3cols|infoboxTemplate|Infobox3cols}} | |||
{{!}} header1 = | |||
{{!}} label1 = label1 | |||
{{!}} data1 = | |||
{{!}} data1a = | |||
{{!}} data1b = data1b | |||
{{!}} data1c = data1c | |||
{{))}}}} | |||
| | |||
{{#invoke:infobox3cols|infoboxTemplate | |||
| header1 = | |||
| label1 = label1 | |||
| data1 = | |||
| data1a = | |||
| data1b = data1b | |||
| data1c = data1c | |||
}} | |||
|} | |||
{| | |||
|+ Example 6 | |||
! Code !! Result | |||
|- style="vertical-align:top" | |||
|{{#tag:pre|{{((}}{{#ifeq:{{NAMESPACE}}|Module|#invoke:infobox3cols|infoboxTemplate|Infobox3cols}} | |||
{{!}} header1 = | |||
{{!}} label1 = label1 | |||
{{!}} data1 = | |||
{{!}} data1a = | |||
{{!}} data1b = | |||
{{!}} data1c = data1c | |||
{{))}}}} | |||
| | |||
{{#invoke:infobox3cols|infoboxTemplate | |||
| header1 = | |||
| label1 = label1 | |||
| data1 = | |||
| data1a = | |||
| data1b = | |||
| data1c = data1c | |||
}} | |||
|} | |||
{| | |||
|+ Example 7 | |||
! Code !! Result | |||
|- style="vertical-align:top" | |||
|{{#tag:pre|{{((}}{{#ifeq:{{NAMESPACE}}|Module|#invoke:infobox3cols|infoboxTemplate|Infobox3cols}} | |||
{{!}} header1 = | |||
{{!}} label1 = | |||
{{!}} data1 = | |||
{{!}} data1a = data1a | |||
{{!}} data1b = data1b | |||
{{!}} data1c = data1c | |||
{{))}}}} | |||
| | |||
{{#invoke:infobox3cols|infoboxTemplate | |||
| header1 = | |||
| label1 = | |||
| data1 = | |||
| data1a = data1a | |||
| data1b = data1b | |||
| data1c = data1c | |||
}} | |||
|} | |||
<includeonly>{{sandbox other||{{testcases other|| | |||
<!-- Categories below this line, please --> | |||
[[Category:Modules]] | [[Category:Modules]] | ||
}}</includeonly> | [[Category:Modules that add a tracking category]] | ||
}}}}</includeonly> |
Latest revision as of 19:43, 11 June 2023
It contains usage information, categories and other content that is not part of the original module page.
|
This module depends on the following other modules: |
This module uses TemplateStyles: |
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
{{#invoke:infobox3cols|infoboxTemplate | 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 = | extracellstyles = 1,3a,4b=... | 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.
Code | Result | ||||
---|---|---|---|---|---|
{{#invoke:infobox3cols|infoboxTemplate | header1 = header1 | label1 = label1 | data1 = data1 | data1a = data1a | data1b = data1b | data1c = data1c }} |
|
Code | Result | ||||
---|---|---|---|---|---|
{{#invoke:infobox3cols|infoboxTemplate | header1 = | label1 = label1 | data1 = data1 | data1a = data1a | data1b = data1b | data1c = data1c }} |
|
Code | Result | ||||
---|---|---|---|---|---|
{{#invoke:infobox3cols|infoboxTemplate | header1 = | label1 = | data1 = data1 | data1a = data1a | data1b = data1b | data1c = data1c }} |
|
Code | Result | ||||
---|---|---|---|---|---|
{{#invoke:infobox3cols|infoboxTemplate | header1 = | label1 = label1 | data1 = | data1a = data1a | data1b = data1b | data1c = data1c }} |
|
Code | Result | ||||
---|---|---|---|---|---|
{{#invoke:infobox3cols|infoboxTemplate | header1 = | label1 = label1 | data1 = | data1a = | data1b = data1b | data1c = data1c }} |
|
Code | Result | |||
---|---|---|---|---|
{{#invoke:infobox3cols|infoboxTemplate | header1 = | label1 = label1 | data1 = | data1a = | data1b = | data1c = data1c }} |
|
Code | Result |
---|---|
{{#invoke:infobox3cols|infoboxTemplate | header1 = | label1 = | data1 = | data1a = data1a | data1b = data1b | data1c = data1c }} |
|