No edit summary |
No edit summary |
||
| Line 4: | Line 4: | ||
It accepts one {{Parameter|mandatory|string}} and up to six additional {{Parameter|optional|string}}s. All seven are used as entries in the table. | It accepts one {{Parameter|mandatory|string}} and up to six additional {{Parameter|optional|string}}s. All seven are used as entries in the table. | ||
It supports | It supports three {{Parameter|optional|named}}s: | ||
* {{Code|caption}} — adds a table caption. | |||
* {{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. | ||
* {{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}}. | ||
==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>}}. | 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>}}. | ||
Revision as of 21:19, 24 October 2022
Template:TableTop is used in conjunction with other Table Templates in the creation of properly formatted tables.
Usage
It accepts one mandatory string parameter and up to six additional optional string parameters. All seven are used as entries in the table.
It supports three optional named parameters:
caption— adds a table caption.sortable— if set totrueit adds thesortableoption to the<table />class.float— controls which side of the content the table appears on,leftorright.
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 />.
