Mr. Johnson (talk | contribs) (Created page with "<includeonly>Category:Table Template</includeonly> {{Template|TableTop}} is used in conjunction with other {{Category|Table Template}}s in the creation of properly formatted tables. ==Usage== It accepts one {{Parameter|mandatory|string}} and up to six additional {{Parameter|optional|string}}s. All seven are used as headers in the table. It supports four {{Parameter|optional|named}}s: * {{Code|float}} — controls which side of the content the table appears on, {...") |
Mr. Johnson (talk | contribs) (Undo revision 1489 by Mr. Johnson (talk)) Tag: Undo |
||
(3 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
{{Template|TableTop}} is used in conjunction with other {{Category|Table Template}}s in the creation of properly formatted tables. | {{Template|TableTop}} is used in conjunction with other {{Category|Table Template}}s in the creation of properly formatted tables. | ||
==Usage== | ==Usage== | ||
It accepts one {{Parameter|mandatory|string}} and up to six additional {{Parameter|optional|string}}s. All seven are used as headers in the table. | It accepts one {{Parameter|mandatory|unnamed string}} and up to six additional {{Parameter|optional|unnamed string}}s. All seven are used as headers in the table. | ||
It supports | It also requires {{Parameter|mandatory|named string}}: | ||
* {{Code|caption}} — adds a table caption. | |||
It supports two {{Parameter|optional|named}}s: | |||
* {{Code|float}} — controls which side of the content the table appears on, {{Code|left}} or {{Code|right}}. | * {{Code|float}} — controls which side of the content the table appears on, {{Code|left}} or {{Code|right}}. | ||
* {{Code|sortable}} — if set to {{code|true}} it adds the {{code|sortable}} option to the {{Code|<nowiki><table /></nowiki>}} class. | * {{Code|sortable}} — if set to {{code|true}} it adds the {{code|sortable}} option to the {{Code|<nowiki><table /></nowiki>}} class. | ||
==Return== | ==Return== | ||
The table starts with {{Code|<nowiki><table class="wikitable"></nowiki>}}, then the supplied parameters are used to construct a {{Code|<nowiki><th /></nowiki>}} with each parameter wrapped in a {{Code|<nowiki><td /></nowiki>}}. For example, {{code|<nowiki>{{TableTop|A|B|C | The table starts with {{Code|<nowiki><table class="wikitable"></nowiki>}}, then the supplied parameters are used to construct a {{Code|<nowiki><th /></nowiki>}} with each parameter wrapped in a {{Code|<nowiki><td /></nowiki>}}. For example, {{code|<nowiki>{{TableTop|Column A|Column B|Column C|caption=Sample|sortable=true}}</nowiki>}} produces the header in: | ||
{{Return|{{Table:Sample}}}} | {{Return|{{Table:Sample}}}} |
Latest revision as of 20:43, 24 November 2023
Template:TableTop
is used in conjunction with other Table Templates in the creation of properly formatted tables.
Usage
It accepts one mandatory unnamed string parameter and up to six additional optional unnamed string parameters. All seven are used as headers in the table.
It also requires mandatory named string parameter:
caption
— adds a table caption.
It supports two optional named parameters:
float
— controls which side of the content the table appears on,left
orright
.sortable
— if set totrue
it adds thesortable
option to the<table />
class.
Return
The table starts with <table class="wikitable">
, then the supplied parameters are used to construct a <th />
with each parameter wrapped in a <td />
. For example, {{TableTop|Column A|Column B|Column C|caption=Sample|sortable=true}}
produces the header in:
Sample
Column A | Column B | Column C |
---|---|---|
Cell A1 | Cell B1 | Cell C1 |
Cell A2 | Cell B2 | Cell C2 |
Cell A3 | Cell B3 | Cell C3 |
[ edit ]