Template:Table: Difference between revisions
Appearance
| [unchecked revision] | [unchecked revision] |
Content deleted Content added
m 1 revision imported |
Caleb Cooper (talk | contribs) No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
class="wikitable {{{{{|safesubst:}}}#switch:{{{1|}}} |
|||
<noinclude>Description of this template and its usage and related templates here... |
|||
| show|hidable|collapsible = collapsible |
|||
| auto|autocollapse = collapsible autocollapse |
|||
Also put this template into a category ... |
|||
| hide|collapse|collapsed = collapsible collapsed |
|||
| sort|sortable = sortable |
|||
==Template code follows== |
|||
| outer|outercollapse = outercollapse |
|||
</noinclude>border="1" cellpadding="4" cellspacing="0" style="border:#c9c9c9 1px solid; margin: 1em 1em 1em 0; border-collapse: collapse;" |
|||
| inner|innercollapse = innercollapse |
|||
| |
|||
}} {{{{{|safesubst:}}}#switch:{{{2|}}} |
|||
| show|hidable|collapsible = collapsible |
|||
| auto|autocollapse = collapsible autocollapse |
|||
| hide|collapse|collapsed = collapsible collapsed |
|||
| sort|sortable = sortable |
|||
| outer|outercollapse = outercollapse |
|||
| inner|innercollapse = innercollapse |
|||
| |
|||
}} {{{{{|safesubst:}}}#switch:{{{3|}}} |
|||
| show|hidable|collapsible = collapsible |
|||
| auto|autocollapse = collapsible autocollapse |
|||
| hide|collapse|collapsed = collapsible collapsed |
|||
| sort|sortable = sortable |
|||
| outer|outercollapse = outercollapse |
|||
| inner|innercollapse = innercollapse |
|||
| |
|||
}} {{{class|}}}"<noinclude> |
|||
{{documentation}} |
|||
</noinclude> |
|||
Latest revision as of 23:00, 10 November 2020
class="wikitable "
Usage
{{Table|param1|param2|param3|class=}}
Use at the beginning of a table to assign the wikitable and other commonly used table CSS classes. With no parameters, the template outputs class="wikitable" The param1, param2, and param3 parameters can be any of the following options:
- Collapse options
show,hidable, orcollapsible: Uses thecollapsibleclass to show a [hide] link to collapse the table, but leaves the table uncollapsed by defaulthide,collapse, orcollapsed: Uses thecollapsible collapsedclasses to make the table collapsed with a [show] link to reveal the table.autoorautocollapse: Uses thecollapsible autocollapseclasses to make the table collapsible, but only collapse it if there are three or more collapsible tables on the pageinnerorinnercollapse: Uses thecollapsible innercollapseclasses to make the table collapsible, but only collapse if the table is within a larger table with theoutercollapseclass.outeroroutercollapse: Uses theoutercollapseclass to collapse any smaller tables within the table it that use theinnercollapseclass. Can be combined with the various collapse and sort options above.
- Sort options
sortorsortable: Uses thesortableclass to add sorting buttons to each column of the table. Can be combined with the various collapse options above or withoutercollapse.
- Other options
- Any other Wikipedia class may be specified using the
|class=parameter.
Up to three parameters can be used, plus the custom |class= parameter, and they can be specified in any order.
Examples
- With no parameters
{| {{Table}}
! Rows !! Data
|-
! Row 1
| Datum1
|-
! Row 2
| Datum2
|}
Uses class="wikitable" to produce
| Rows | Data |
|---|---|
| Row 1 | Datum1 |
| Row 2 | Datum2 |
- With parameters
{| {{Table|hide|sort}}
! Rows !! Data
|-
! Row 1
| Datum1
|-
! Row 2
| Datum2
|}
Uses class="wikitable collapsible collapsed sortable" to produce
| Rows | Data |
|---|---|
| Row 1 | Datum1 |
| Row 2 | Datum2 |
- With custom parameters
{| {{Table|sort|class=floatright}}
! Rows !! Data
|-
! Row 1
| Datum1
|-
! Row 2
| Datum2
|}
Uses class="wikitable sortable floatright" to produce:
| Rows | Data |
|---|---|
| Row 1 | Datum1 |
| Row 2 | Datum2 |