الگو:Table
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 thecollapsible
class to show a [hide] link to collapse the table, but leaves the table uncollapsed by defaulthide
,collapse
, orcollapsed
: Uses thecollapsible collapsed
classes to make the table collapsed with a [show] link to reveal the table.auto
orautocollapse
: Uses thecollapsible autocollapse
classes to make the table collapsible, but only collapse it if there are three or more collapsible tables on the pageinner
orinnercollapse
: Uses thecollapsible innercollapse
classes to make the table collapsible, but only collapse if the table is within a larger table with theoutercollapse
class.outer
oroutercollapse
: Uses theoutercollapse
class to collapse any smaller tables within the table it that use theinnercollapse
class. Can be combined with the various collapse and sort options above.
- Sort options
sort
orsortable
: Uses thesortable
class 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
[ویرایش]Example One
[ویرایش]{{Table |hdrs=Timeline |row1=2001 Started research |row2=2002 Published findings}}
class="wikitable "
Example Two
[ویرایش]{{Table |type=class="wikitable sortable" |title=Example Table Two |hdrs=Year!!Comments |row1=2001{{!!}}Started research |row2=2002{{!!}}Published findings}}
class="wikitable "
Misuse of this template
[ویرایش]Inexperienced editors may confuse this template with the manual way of making tables, and mix the two, or otherwise make odd mistakes. For example, this text (that accomplishes nothing) may appear within a page's wikimarkup: {{table}}. To prevent this from occurring, a message is displayed to the user instructing them about misuse. Also, the page is added to the Articles using the table template incorrectly category. After the initial cleanup (all instances of {{table}} were removed), it seems unlikely now that someone would use this template wrong because of the warning message. But keep an eye on that category, just in case!
External links
[ویرایش]- Copy & Paste Excel-to-Wiki Converter; a fine tool for copying Excel data to wiki
- Commons:Convert tables and charts to wiki code