Template:Infobox3cols/doc: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 6: | Line 6: | ||
{{clear}} | {{clear}} | ||
== Usage == | == Usage == | ||
{{Pre|width=25%| | |||
{{|Infobox3cols | {{{{fcb|#4169e1|Infobox3cols}} | ||
| child = | | {{fcb|#2e8b57|name}} = | ||
| bodyclass = | | {{fcb|#2e8b57|child}} = | ||
| bodystyle = | | {{fcb|#2e8b57|bodyclass}} = | ||
| title = | | {{fcb|#2e8b57|bodystyle}} = | ||
| titleclass = | |||
| titlestyle = | | {{fcb|#2e8b57|title}} = | ||
| above = | | {{fcb|#2e8b57|titleclass}} = | ||
| abovestyle = | | {{fcb|#2e8b57|titlestyle}} = | ||
| aboveclass = | |||
| aboverowclass = | | {{fcb|#2e8b57|above}} = | ||
| subheader = | | {{fcb|#2e8b57|abovestyle}} = | ||
| subheaderstyle = | | {{fcb|#2e8b57|aboveclass}} = | ||
| subheaderclass = | | {{fcb|#2e8b57|aboverowclass}} = | ||
| subheaderrowclass1 = | |||
| subheader2 = | | {{fcb|#2e8b57|subheader}} = | ||
| subheaderrowclass2 = | | {{fcb|#2e8b57|subheaderstyle}} = | ||
| image = | | {{fcb|#2e8b57|subheaderclass}} = | ||
| image1 = | | {{fcb|#2e8b57|subheaderrowclass1}} = | ||
| caption = | | {{fcb|#2e8b57|subheader2}} = | ||
| caption1 = | | {{fcb|#2e8b57|subheaderrowclass2}} = | ||
| captionstyle = | |||
| imagestyle = | | {{fcb|#2e8b57|image}} = | ||
| imageclass = | | {{fcb|#2e8b57|image1}} = | ||
| imagerowclass1 = | | {{fcb|#2e8b57|caption}} = | ||
| image2 = | | {{fcb|#2e8b57|caption1}} = | ||
| caption2 = | | {{fcb|#2e8b57|captionstyle}} = | ||
| imagerowclass2 = | | {{fcb|#2e8b57|imagestyle}} = | ||
| {{fcb|#2e8b57|imageclass}} = | |||
| {{fcb|#2e8b57|imagerowclass1}} = | |||
| {{fcb|#2e8b57|image2}} = | |||
| {{fcb|#2e8b57|caption2}} = | |||
| {{fcb|#2e8b57|imagerowclass2}} = | |||
| headerstyle = | | {{fcb|#2e8b57|headerstyle}} = | ||
| labelstyle = | | {{fcb|#2e8b57|labelstyle}} = | ||
| datastyle = | | {{fcb|#2e8b57|datastyle}} = | ||
| datastylea = | | {{fcb|#2e8b57|datastylea}} = | ||
| datastyleb = | | {{fcb|#2e8b57|datastyleb}} = | ||
| datastylec = | | {{fcb|#2e8b57|datastylec}} = | ||
| header1 = | | {{fcb|#2e8b57|header1}} = | ||
| label1 = | | {{fcb|#2e8b57|label1}} = | ||
| data1 = | | {{fcb|#2e8b57|data1}} = | ||
| data1a = | | {{fcb|#2e8b57|data1a}} = | ||
| data1b = | | {{fcb|#2e8b57|data1b}} = | ||
| data1c = | | {{fcb|#2e8b57|data1c}} = | ||
| class1 = | | {{fcb|#2e8b57|class1}} = | ||
| rowclass1 = | | {{fcb|#2e8b57|rowclass1}} = | ||
| header2 = | | {{fcb|#2e8b57|header2}} = | ||
| rowclass2 = | | {{fcb|#2e8b57|rowclass2}} = | ||
| label2 = | | {{fcb|#2e8b57|label2}} = | ||
| data2 = | | {{fcb|#2e8b57|data2}} = | ||
| class2 = | | {{fcb|#2e8b57|class2}} = | ||
| data2a = | | {{fcb|#2e8b57|data2a}} = | ||
| data2b = | | {{fcb|#2e8b57|data2b}} = | ||
| class2a = | | {{fcb|#2e8b57|class2a}} = | ||
| class2b = | | {{fcb|#2e8b57|class2b}} = | ||
| class2c = | | {{fcb|#2e8b57|class2c}} = | ||
| data2c = | | {{fcb|#2e8b57|data2c}} = | ||
| ... | | ... | ||
| below = | | {{fcb|#2e8b57|below}} = | ||
| belowstyle = | | {{fcb|#2e8b57|belowstyle}} = | ||
| belowclass = | | {{fcb|#2e8b57|belowclass}} = | ||
| belowrowclass = | | {{fcb|#2e8b57|belowrowclass}} = | ||
}} | }} }} | ||
== Parameter Precedence == | == Parameter Precedence == | ||
Line 78: | Line 82: | ||
{| | {| | ||
|+ Example 1 | |+ '''Example 1''' | ||
! Code !! Result | ! Code !! Result | ||
|- style="vertical-align:top" | |- style="vertical-align:top" | ||
| | | | ||
{{ | {{Pre| | ||
| header1 | {{{{fcb|#4169e1|Infobox3cols}} | ||
| label1 | <nowiki>|</nowiki> {{fcb|#2e8b57|header1}} = {{fc|#933|header1}} | ||
| data1 | <nowiki>|</nowiki> {{fcb|#2e8b57|label1}} = {{fc|#933|label1}} | ||
| data1a | <nowiki>|</nowiki> {{fcb|#2e8b57|data1}} = {{fc|#933|data1}} | ||
| data1b | <nowiki>|</nowiki> {{fcb|#2e8b57|data1a}} = {{fc|#933|data1a}} | ||
| data1c | <nowiki>|</nowiki> {{fcb|#2e8b57|data1b}} = {{fc|#933|data1b}} | ||
}} | <nowiki>|</nowiki> {{fcb|#2e8b57|data1c}} = {{fc|#933|data1c}} | ||
}} }} | |||
| | | | ||
{{ | {{Infobox3cols | ||
| header1 = header1 | | header1 = header1 | ||
| label1 = label1 | | label1 = label1 | ||
Line 102: | Line 107: | ||
{| | {| | ||
|+ Example 2 | |+ '''Example 2''' | ||
! Code !! Result | ! Code !! Result | ||
|- style="vertical-align:top" | |- style="vertical-align:top" | ||
| | | | ||
{{ | {{Pre| | ||
| header1 | {{{{fcb|#4169e1|Infobox3cols}} | ||
| label1 | <nowiki>|</nowiki> {{fcb|#2e8b57|header1}} = | ||
| data1 | <nowiki>|</nowiki> {{fcb|#2e8b57|label1}} = {{fc|#933|label1}} | ||
| data1a | <nowiki>|</nowiki> {{fcb|#2e8b57|data1}} = {{fc|#933|data1}} | ||
| data1b | <nowiki>|</nowiki> {{fcb|#2e8b57|data1a}} = {{fc|#933|data1a}} | ||
| data1c | <nowiki>|</nowiki> {{fcb|#2e8b57|data1b}} = {{fc|#933|data1b}} | ||
}} | <nowiki>|</nowiki> {{fcb|#2e8b57|data1c}} = {{fc|#933|data1c}} | ||
}} }} | |||
| | | | ||
{{infobox3cols | {{infobox3cols | ||
Line 126: | Line 132: | ||
{| | {| | ||
|+ Example 3 | |+ '''Example 3''' | ||
! Code !! Result | ! Code !! Result | ||
|- style="vertical-align:top" | |- style="vertical-align:top" | ||
| | | | ||
{{ | {{Pre| | ||
| header1 | {{{{fcb|#4169e1|Infobox3cols}} | ||
| label1 | <nowiki>|</nowiki> {{fcb|#2e8b57|header1}} = | ||
| data1 | <nowiki>|</nowiki> {{fcb|#2e8b57|label1}} = | ||
| data1a | <nowiki>|</nowiki> {{fcb|#2e8b57|data1}} = {{fc|#933|data1}} | ||
| data1b | <nowiki>|</nowiki> {{fcb|#2e8b57|data1a}} = {{fc|#933|data1a}} | ||
| data1c | <nowiki>|</nowiki> {{fcb|#2e8b57|data1b}} = {{fc|#933|data1b}} | ||
}} | <nowiki>|</nowiki> {{fcb|#2e8b57|data1c}} = {{fc|#933|data1c}} | ||
}} }} | |||
| | | | ||
{{infobox3cols | {{infobox3cols | ||
Line 150: | Line 157: | ||
{| | {| | ||
|+ Example 4 | |+ '''Example 4''' | ||
! Code !! Result | ! Code !! Result | ||
|- style="vertical-align:top" | |- style="vertical-align:top" | ||
| | | | ||
{{ | {{Pre| | ||
| header1 | {{{{fcb|#4169e1|Infobox3cols}} | ||
| label1 | <nowiki>|</nowiki> {{fcb|#2e8b57|header1}} = | ||
| data1 | <nowiki>|</nowiki> {{fcb|#2e8b57|label1}} = {{fc|#933|label1}} | ||
| data1a | <nowiki>|</nowiki> {{fcb|#2e8b57|data1}} = | ||
| data1b | <nowiki>|</nowiki> {{fcb|#2e8b57|data1a}} = {{fc|#933|data1a}} | ||
| data1c | <nowiki>|</nowiki> {{fcb|#2e8b57|data1b}} = {{fc|#933|data1b}} | ||
}} | <nowiki>|</nowiki> {{fcb|#2e8b57|data1c}} = {{fc|#933|data1c}} | ||
}} }} | |||
| | | | ||
{{infobox3cols | {{infobox3cols | ||
Line 174: | Line 182: | ||
{| | {| | ||
|+ Example 5 | |+ '''Example 5''' | ||
! Code !! Result | ! Code !! Result | ||
|- style="vertical-align:top" | |- style="vertical-align:top" | ||
| | | | ||
{{ | {{Pre| | ||
| header1 | {{{{fcb|#4169e1|Infobox3cols}} | ||
| label1 | <nowiki>|</nowiki> {{fcb|#2e8b57|header1}} = | ||
| data1 | <nowiki>|</nowiki> {{fcb|#2e8b57|label1}} = {{fc|#933|label1}} | ||
| data1a | <nowiki>|</nowiki> {{fcb|#2e8b57|data1}} = | ||
| data1b | <nowiki>|</nowiki> {{fcb|#2e8b57|data1a}} = | ||
| data1c | <nowiki>|</nowiki> {{fcb|#2e8b57|data1b}} = {{fc|#933|data1b}} | ||
}} | <nowiki>|</nowiki> {{fcb|#2e8b57|data1c}} = {{fc|#933|data1c}} | ||
}} }} | |||
| | | | ||
{{infobox3cols | {{infobox3cols | ||
Line 198: | Line 207: | ||
{| | {| | ||
|+ Example 6 | |+ '''Example 6''' | ||
! Code !! Result | ! Code !! Result | ||
|- style="vertical-align:top" | |- style="vertical-align:top" | ||
| | | | ||
{{ | {{Pre| | ||
| header1 | {{{{fcb|#4169e1|Infobox3cols}} | ||
| label1 | <nowiki>|</nowiki> {{fcb|#2e8b57|header1}} = | ||
| data1 | <nowiki>|</nowiki> {{fcb|#2e8b57|label1}} = {{fc|#933|label1}} | ||
| data1a | <nowiki>|</nowiki> {{fcb|#2e8b57|data1}} = | ||
| data1b | <nowiki>|</nowiki> {{fcb|#2e8b57|data1a}} = | ||
| data1c | <nowiki>|</nowiki> {{fcb|#2e8b57|data1b}} = | ||
}} | <nowiki>|</nowiki> {{fcb|#2e8b57|data1c}} = {{fc|#933|data1c}} | ||
}} }} | |||
| | | | ||
{{infobox3cols | {{infobox3cols | ||
Line 222: | Line 232: | ||
{| | {| | ||
|+ Example 7 | |+ '''Example 7''' | ||
! Code !! Result | ! Code !! Result | ||
|- style="vertical-align:top" | |- style="vertical-align:top" | ||
| | | | ||
{{ | {{Pre| | ||
| header1 | {{{{fcb|#4169e1|Infobox3cols}} | ||
| label1 | <nowiki>|</nowiki> {{fcb|#2e8b57|header1}} = | ||
| data1 | <nowiki>|</nowiki> {{fcb|#2e8b57|label1}} = | ||
| data1a | <nowiki>|</nowiki> {{fcb|#2e8b57|data1}} = | ||
| data1b | <nowiki>|</nowiki> {{fcb|#2e8b57|data1a}} = {{fc|#933|data1a}} | ||
| data1c | <nowiki>|</nowiki> {{fcb|#2e8b57|data1b}} = {{fc|#933|data1b}} | ||
}} | <nowiki>|</nowiki> {{fcb|#2e8b57|data1c}} = {{fc|#933|data1c}} | ||
}} }} | |||
| | | | ||
{{infobox3cols | {{infobox3cols | ||
Line 244: | Line 255: | ||
}} | }} | ||
|} | |} | ||
== TemplateDate == | |||
<templatedata> | |||
{ | |||
"description": "This template is intended as a meta template, a template used for constructing other templates. In general, it is not meant for use directly in an article but can be used on a one-off basis if required.", | |||
"format": "{{_\n| ________________ = _\n}}\n", | |||
"params": { | |||
"title": { | |||
"label": "Title", | |||
"description": "Title displayed above the infobox", | |||
"type": "string", | |||
"suggested": true | |||
}, | |||
"image": { | |||
"label": "Image", | |||
"description": "Image illustrating the topic. Use full image syntax.", | |||
"type": "content", | |||
"suggested": true, | |||
"example": "[[File:example.png|200px|alt=Example alt text]]" | |||
}, | |||
"caption": { | |||
"label": "Caption", | |||
"description": "caption for the image", | |||
"type": "content", | |||
"suggested": true | |||
} | |||
}, | |||
"paramOrder": [ | |||
"title", | |||
"image", | |||
"caption" | |||
] | |||
} | |||
</templatedata> | |||
<includeonly>{{sandbox other||{{testcases other|| | <includeonly>{{sandbox other||{{testcases other|| | ||
<!-- Categories below this line, please --> | <!-- Categories below this line, please --> | ||
[[Category:Utility templates]] | |||
[[Category:Utility | |||
}}}}</includeonly> | }}}}</includeonly> |
Latest revision as of 01:47, 20 August 2023
It contains usage information, categories and other content that is not part of the original template page.
|
This template uses Lua: |
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 | name = | 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 = }}
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 | ||||
---|---|---|---|---|---|
{{Infobox3cols | header1 = header1 | label1 = label1 | data1 = data1 | data1a = data1a | data1b = data1b | data1c = data1c }} |
|
Code | Result | ||||
---|---|---|---|---|---|
{{Infobox3cols | header1 = | label1 = label1 | data1 = data1 | data1a = data1a | data1b = data1b | data1c = data1c }} |
|
Code | Result | ||||
---|---|---|---|---|---|
{{Infobox3cols | header1 = | label1 = | data1 = data1 | data1a = data1a | data1b = data1b | data1c = data1c }} |
|
Code | Result | ||||
---|---|---|---|---|---|
{{Infobox3cols | header1 = | label1 = label1 | data1 = | data1a = data1a | data1b = data1b | data1c = data1c }} |
|
Code | Result | ||||
---|---|---|---|---|---|
{{Infobox3cols | header1 = | label1 = label1 | data1 = | data1a = | data1b = data1b | data1c = data1c }} |
|
Code | Result | |||
---|---|---|---|---|
{{Infobox3cols | header1 = | label1 = label1 | data1 = | data1a = | data1b = | data1c = data1c }} |
|
Code | Result |
---|---|
{{Infobox3cols | header1 = | label1 = | data1 = | data1a = data1a | data1b = data1b | data1c = data1c }} |
|
TemplateDate
This template is intended as a meta template, a template used for constructing other templates. In general, it is not meant for use directly in an article but can be used on a one-off basis if required.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Title | title | Title displayed above the infobox | String | suggested |
Image | image | Image illustrating the topic. Use full image syntax.
| Content | suggested |
Caption | caption | caption for the image | Content | suggested |