Template:Tabcol: Difference between revisions

Template page
No edit summary
m (Protected "Template:Tabcol": High traffic page ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#switch: {{1}}
<includeonly>{{#switch: {{{1}}}
| 4 = {{#switch: {{2}} | 1 = 12 | 2 = 6 | 3 = 4 | 4 = 3 | 12}}
| 1 = {{#switch: {{{2}}} | 1 = colspan{{=}}"1" | colspan{{=}}"1"}}
}}
| 2 = {{#switch: {{{2}}} | 1 = colspan{{=}}"2" | 2 = colspan{{=}}"1" | colspan{{=}}"2"}}
| 3 = {{#switch: {{{2}}} | 1 = colspan{{=}}"6" | 2 = colspan{{=}}"3" | 3 = colspan{{=}}"2" | colspan{{=}}"6"}}
| 4 = {{#switch: {{{2}}} | 1 = colspan{{=}}"12" | 2 = colspan{{=}}"6" | 3 = colspan{{=}}"4" | 4 = colspan{{=}}"3" | colspan{{=}}"12"}}
| 5 = {{#switch: {{{2}}} | 1 = colspan{{=}}"60" | 2 = colspan{{=}}"30" | 3 = colspan{{=}}"20" | 4 = colspan{{=}}"15" | 5 = colspan{{=}}"12" | colspan{{=}}"60"}}
| 6 = {{#switch: {{{2}}} | 1 = colspan{{=}}"60" | 2 = colspan{{=}}"30" | 3 = colspan{{=}}"20" | 4 = colspan{{=}}"15" | 5 = colspan{{=}}"12" | 6 = colspan{{=}}"10" | colspan{{=}}"60"}}
| 7 = {{#switch: {{{2}}} | 1 = colspan{{=}}"420" | 2 = colspan{{=}}"210" | 3 = colspan{{=}}"140" | 4 = colspan{{=}}"105" | 5 = colspan{{=}}"84" | 6 = colspan{{=}}"70" | 7 = colspan{{=}}"60" | colspan{{=}}"420"}}
| 8 = {{#switch: {{{2}}} | 1 = colspan{{=}}"840" | 2 = colspan{{=}}"420" | 3 = colspan{{=}}"280" | 4 = colspan{{=}}"210" | 5 = colspan{{=}}"168" | 6 = colspan{{=}}"140" | 7 = colspan{{=}}"120" | 8 = colspan{{=}}"105" | colspan{{=}}"840"}}
}}</includeonly><noinclude>This template aims to ease the creation of a uniform table with different number of columns in each row.
 
== Syntax ==
'''<nowiki>{{ tabcol</nowiki>''' | ''parameter'' | ''parameter'' '''}}'''
 
* The first parameter captures the maximum number of columns present in the variable portion of the table. Currently, the table can accept up to 8 columns in this parameter.
* The second parameter captures the number number of columns to be present in that particular row. Needless to say, the number mentioned in the second parameter cannot exceed the first.
[[Category:Templates]]</noinclude>

Latest revision as of 08:55, 15 January 2022

This template aims to ease the creation of a uniform table with different number of columns in each row.

Syntax

{{ tabcol | parameter | parameter }}

  • The first parameter captures the maximum number of columns present in the variable portion of the table. Currently, the table can accept up to 8 columns in this parameter.
  • The second parameter captures the number number of columns to be present in that particular row. Needless to say, the number mentioned in the second parameter cannot exceed the first.