Template:Infobox3cols/doc: Difference between revisions

From The Global Wiki
Jump to navigation Jump to search
en>Paine Ellsworth
 
m (1 revision imported)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
#REDIRECT [[Template:Infobox3cols/doc]]
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{#ifeq:{{SUBPAGENAME}}|sandbox||{{High-use}}}}
{{Lua |Module:Infobox3cols|Module:Navbar|Module:Italic title| Module:Check for unknown parameters }}
{{Uses TemplateStyles|Template:Plainlist/styles.css|Template:Hlist/styles.css}}


{{Rcat shell|
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.
{{R from documentation page}}
 
{{R to documentation page}}
{{clear}}
{{R for convenience}}
== Usage ==
{{text|<pr}}{{text|e>}}{{((}}{{#ifeq:{{NAMESPACE}}|Module|&#35;invoke:infobox3cols&#124;infoboxTemplate|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 =
| 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 =
}}{{text|</pr}}{{text|e>}}
 
== 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.
 
{|
|+ Example 1
! Code !! Result
|- style="vertical-align:top"
|{{#tag:pre|{{((}}{{#ifeq:{{NAMESPACE}}|Module|&#35;invoke:infobox3cols&#124;infoboxTemplate|Infobox3cols}}
{{!}} header1 = header1
{{!}} label1 = label1
{{!}} data1 = data1
{{!}} data1a = data1a
{{!}} data1b = data1b
{{!}} data1c = data1c
{{))}}}}
|
{{infobox3cols
| 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|&#35;invoke:infobox3cols&#124;infoboxTemplate|Infobox3cols}}
{{!}} header1 =
{{!}} label1 = label1
{{!}} data1 = data1
{{!}} data1a = data1a
{{!}} data1b = data1b
{{!}} data1c = data1c
{{))}}}}
|
{{infobox3cols
| header1 =
| label1 = label1
| data1 = data1
| data1a = data1a
| data1b = data1b
| data1c = data1c
}}
|}
 
{|
|+ Example 3
! Code !! Result
|- style="vertical-align:top"
|{{#tag:pre|{{((}}{{#ifeq:{{NAMESPACE}}|Module|&#35;invoke:infobox3cols&#124;infoboxTemplate|Infobox3cols}}
{{!}} header1 =
{{!}} label1 =
{{!}} data1 = data1
{{!}} data1a = data1a
{{!}} data1b = data1b
{{!}} data1c = data1c
{{))}}}}
|
{{infobox3cols
| header1 =
| label1 =
| data1 = data1
| data1a = data1a
| data1b = data1b
| data1c = data1c
}}
|}
 
{|
|+ Example 4
! Code !! Result
|- style="vertical-align:top"
|{{#tag:pre|{{((}}{{#ifeq:{{NAMESPACE}}|Module|&#35;invoke:infobox3cols&#124;infoboxTemplate|Infobox3cols}}
{{!}} header1 =
{{!}} label1 = label1
{{!}} data1 =
{{!}} data1a = data1a
{{!}} data1b = data1b
{{!}} data1c = data1c
{{))}}}}
|
{{infobox3cols
| header1 =
| label1 = label1
| data1 =
| data1a = data1a
| data1b = data1b
| data1c = data1c
}}
|}
 
{|
|+ Example 5
! Code !! Result
|- style="vertical-align:top"
|{{#tag:pre|{{((}}{{#ifeq:{{NAMESPACE}}|Module|&#35;invoke:infobox3cols&#124;infoboxTemplate|Infobox3cols}}
{{!}} header1 =
{{!}} label1 = label1
{{!}} data1 =
{{!}} data1a =
{{!}} data1b = data1b
{{!}} data1c = data1c
{{))}}}}
|
{{infobox3cols
| header1 =
| label1 = label1
| data1 =
| data1a =
| data1b = data1b
| data1c = data1c
}}
}}
|}
{|
|+ Example 6
! Code !! Result
|- style="vertical-align:top"
|{{#tag:pre|{{((}}{{#ifeq:{{NAMESPACE}}|Module|&#35;invoke:infobox3cols&#124;infoboxTemplate|Infobox3cols}}
{{!}} header1 =
{{!}} label1 = label1
{{!}} data1 =
{{!}} data1a =
{{!}} data1b =
{{!}} data1c = data1c
{{))}}}}
|
{{infobox3cols
| header1 =
| label1 = label1
| data1 =
| data1a =
| data1b =
| data1c = data1c
}}
|}
{|
|+ Example 7
! Code !! Result
|- style="vertical-align:top"
|{{#tag:pre|{{((}}{{#ifeq:{{NAMESPACE}}|Module|&#35;invoke:infobox3cols&#124;infoboxTemplate|Infobox3cols}}
{{!}} header1 =
{{!}} label1 =
{{!}} data1 =
{{!}} data1a = data1a
{{!}} data1b = data1b
{{!}} data1c = data1c
{{))}}}}
|
{{infobox3cols
| header1 =
| label1 =
| data1 =
| data1a = data1a
| data1b = data1b
| data1c = data1c
}}
|}
== Tracking categories ==
* {{clc|Pages using infobox3cols with undocumented parameters}}
* {{clc|Pages using infobox3cols with header0 or label0 or data0}}
* {{clc|Pages using infobox3cols with multidatastyle}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Infobox templates| ]]
[[Category:Wikipedia metatemplates]]
[[Category:Templates that add a tracking category]]
[[Category:Infobox templates with three columns| ]]
}}</includeonly>

Latest revision as of 01:24, 18 January 2023

Script error: No such module "High-use".

Script error: No such 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

{{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 = 
| 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.

Example 1
Code Result
{{Infobox3cols
| header1 = header1
| label1 = label1
| data1 = data1
| data1a = data1a
| data1b = data1b
| data1c = data1c
}}

Script error: No such module "Infobox3cols".

Example 2
Code Result
{{Infobox3cols
| header1 = 
| label1 = label1
| data1 = data1
| data1a = data1a
| data1b = data1b
| data1c = data1c
}}

Script error: No such module "Infobox3cols".

Example 3
Code Result
{{Infobox3cols
| header1 = 
| label1 = 
| data1 = data1
| data1a = data1a
| data1b = data1b
| data1c = data1c
}}

Script error: No such module "Infobox3cols".

Example 4
Code Result
{{Infobox3cols
| header1 = 
| label1 = label1
| data1 = 
| data1a = data1a
| data1b = data1b
| data1c = data1c
}}

Script error: No such module "Infobox3cols".

Example 5
Code Result
{{Infobox3cols
| header1 = 
| label1 = label1
| data1 = 
| data1a = 
| data1b = data1b
| data1c = data1c
}}

Script error: No such module "Infobox3cols".

Example 6
Code Result
{{Infobox3cols
| header1 = 
| label1 = label1
| data1 = 
| data1a = 
| data1b = 
| data1c = data1c
}}

Script error: No such module "Infobox3cols".

Example 7
Code Result
{{Infobox3cols
| header1 = 
| label1 = 
| data1 = 
| data1a = data1a
| data1b = data1b
| data1c = data1c
}}

Script error: No such module "Infobox3cols".

Tracking categories