Changes

3,288 bytes added ,  15:51, 13 May 2019
m
→‎See also: link to template wikitable
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
== Usage ==

<code><nowiki>{{Table|</nowiki>''param1''|''param2''|''param3''|class=<nowiki>}}</nowiki></code>

Use at the beginning of a table to assign the <code>wikitable</code> and other commonly used table CSS classes. With no parameters, the template outputs <code>class="wikitable"</code> The ''param1'', ''param2'', and ''param3'' parameters can be any of the following options:

;Collapse options
*'''<code>show</code>, <code>hidable</code>, or <code>collapsible</code>:''' Uses the <code>collapsible</code> class to show a [hide] link to [[Help:Collapsing|collapse]] the table, but leaves the table uncollapsed by default
*'''<code>hide</code>, <code>collapse</code>, or <code>collapsed</code>:''' Uses the <code>collapsible collapsed</code> classes to make the table [[Help:Collapsing|collapsed]] with a [show] link to reveal the table.
*'''<code>auto</code> or <code>autocollapse</code>:''' Uses the <code>collapsible autocollapse</code> classes to make the table [[Help:Collapsing|collapsible]], but only collapse it if there are three or more collapsible tables on the page
*'''<code>inner</code> or <code>innercollapse</code>:''' Uses the <code>collapsible innercollapse</code> classes to make the table [[Help:Collapsing|collapsible]], but only collapse if the table is within a larger table with the <code>outercollapse</code> class.
*'''<code>outer</code> or <code>outercollapse</code>:''' Uses the <code>outercollapse</code> class to collapse any smaller tables within the table it that use the <code>innercollapse</code> class. Can be combined with the various collapse and sort options above.

;Sort options
*'''<code>sort</code> or <code>sortable</code>:''' Uses the <code>sortable</code> class to add [[Help:Sorting|sorting buttons]] to each column of the table. Can be combined with the various collapse options above or with <code>outercollapse</code>.

;Other options
*Any other Wikipedia class may be specified using the {{para|class}} parameter.

;
Up to three parameters can be used, plus the custom {{para|class}} parameter, and they can be specified in any order.

==Examples==
;With no parameters
<pre>{| {{Table}}
! Rows !! Data
|-
! Row 1
| Datum1
|-
! Row 2
| Datum2
|}</pre>
Uses <code>class="wikitable"</code> to produce
{| {{Table}}
! Rows !! Data
|-
! Row 1
| Datum1
|-
! Row 2
| Datum2
|}

;With parameters
<pre>{| {{Table|hide|sort}}
! Rows !! Data
|-
! Row 1
| Datum1
|-
! Row 2
| Datum2
|}</pre>
Uses <code>class="wikitable collapsible collapsed sortable"</code> to produce
{| {{Table|hide|sort}}
! Rows !! Data
|-
! Row 1
| Datum1
|-
! Row 2
| Datum2
|}

;With custom parameters
<pre>{| {{Table|sort|class=floatright}}
! Rows !! Data
|-
! Row 1
| Datum1
|-
! Row 2
| Datum2
|}</pre>
Uses <code>class="wikitable sortable floatright"</code> to produce:
{| {{Table|sort|class=floatright}}
! Rows !! Data
|-
! Row 1
| Datum1
|-
! Row 2
| Datum2
|}

{{clear}}
==See also==
*[[Help:Table]]
*[[Help:Collapsing]]
*[[Help:Sorting]]
*{{t1|Wikitable}}
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Table templates]]
}}</includeonly>
Anonymous user