| cell 1 | cell 2 | syntax:
|>> TML <<| syntax.
|^| syntax.
TABLEATTRIBUTES Plugin setting in current topic.
TABLEATTRIBUTES preferences setting on site-level (TWikiPreferences) or web-level (any WebPreferences), such as: Set TABLEATTRIBUTES = tableborder="0" cellpadding="1" ...
%TABLE{...}%.
|>> TML <<|. Example:
You write:
| *A1* | *B1* | *C1* | *D1* | | A2 |>> B2 * Bullet * list * is * possible <<|>> C2 | *C2.1* | *C2.2* | | Embedded | table | | possible | too | end C2 <<| D2 | | A3 | B3 | C3 | D3 | |
You get:
|
| One One | One Two | One Three | | ^ | Two Two | Two Three | | Three One | ^ | Three Three |You get:
TABLEATTRIBUTES Plugin setting in this topic, a TABLEATTRIBUTES preferences setting, or on line before the table using %TABLE{...}%:
| Argument | Comment | Default value | Example |
|---|---|---|---|
sort | Set table sorting by clicking headers "on" or "off". | unspecified | sort="on" |
initsort | Column to sort initially ("1" to number of columns). | unspecified | initsort="2" |
initdirection | Initial sorting direction for initsort, set to "up" (descending) or "down" (ascending). | unspecified | initdirection="up" |
disableallsort | Disable all sorting, both initsort and header sort. This is mainly used by plugins such as the EditTablePlugin to disable sorting in a table while editing the table. | unspecified | disableallsort="on" |
headerbg | Header cell background color. | "#6b7f93" | headerbg="#999999" |
headerbgsorted | Header cell background color of a sorted column. | the value of headerbg | headerbgsorted="#32596c" |
headercolor | Header cell text color. | "#ffffff" | headercolor="#0000cc" |
databg | Data cell background color, a comma separated list. Specify "none" for no color, that is to use the color/background of the page the table is on. | "#edf4f9,#ffffff" | databg="#f2f2f2,#ffffff" |
databgsorted | Data cell background color of a sorted column; see databg. | the values of databg | databgsorted="#d4e8e4,#e5f5ea" |
datacolor | Data cell text color, a comma separated list. | unspecified | datacolor="#0000CC, #000000" |
tableborder | Table border width (pixels). | "1" | tableborder="2" |
tableframe | Table frame, set to "void" (no sides), "above" (the top side only), "below" (the bottom side only), "hsides" (the top and bottom sides only), "lhs" (the left-hand side only), "rhs" (the right-hand side only), "vsides" (the right and left sides only), "box" (all four sides), "border" (all four sides). | unspecified | tableframe="hsides" |
tablerules | Table rules, set to "none" (no rules), "groups" (rules will appear between row groups and column groups only), "rows" (rules will appear between rows only), "cols" (rules will appear between columns only), "all" (rules will appear between all rows and columns). | unspecified | tablerules="rows" |
cellpadding | Cell padding (pixels). | "0" | cellpadding="0" |
cellspacing | Cell spacing (pixels). | "0" | cellspacing="3" |
cellborder | Cell border width (pixels). | unspecified | cellborder="0" |
valign | Vertical alignment of cells and headers, set to "top", "middle", "bottom" or "baseline". | unspecified | valign="top" |
headervalign | Vertical alignment of header cells; overrides valign. | unspecified | headervalign="top" |
datavalign | Vertical alignment of data cells; overrides valign. | unspecified | datavalign="top" |
headeralign | Header cell alignment, one value for all columns, or a comma separated list for different alignment of individual columns. Set to "left", "center", "right" or "justify". Overrides individual cell settings. | unspecified | headeralign="left,right" |
dataalign | Data cell alignment, one value for all columns, or a comma separated list for different alignment of individual columns. Set to "left", "center", "right" or "justify". Overrides individual cell settings. | unspecified | dataalign="center" |
tablewidth | Table width: Percentage of window width, or absolute pixel value. | unspecified | tablewidth="100%" |
columnwidths | Column widths: Comma delimited list of column widths, percentage or absolute pixel value. | unspecified | columnwidths="80%,20%" |
headerrows | Number of header rows to exclude from sort. (will be rendered in a HTML thead section) | (determined automatically) | headerrows="2" |
footerrows | Number of footer rows to exclude from sort. (will be rendered in a HTML tfoot section) | "0" | footerrows="1" |
id | Unique table identifier string, used for targeting a table with CSS. | tableN (where N is the table order number on the page) | id="userTable" |
summary | Table summary used by screenreaders: A summary of what the table presents. It should provide an orientation for someone who listens to the table. | unspecified | summary="List of subscribed users" |
caption | Table caption: A title that will be displayed just above the table. | unspecified | caption="Users" |
%TABLE{...}% settings override TABLEATTRIBUTES preferences settings, which override the TABLEATTRIBUTES Plugin settings.
The setting disableallsort is normally not used as a TABLE or TABLEATTRIBUTES setting. Plugins such as EditTablePlugin dynamically sets disableallsort to disable sorting while editing a table. For this to work it is important that EditTablePlugin runs before TablePlugin, which is the default. The setting sort can be overwritten by a URL parameter or hidden formfield of the same name. Plugins such as EditTablePlugin can use this to disable table header sorting while in edit mode.
%TABLE{ sort="on" tableborder="0" cellpadding="4" cellspacing="3" cellborder="0" headerbg="#D5CCB1" headercolor="#666666" databg="#FAF0D4, #F3DFA8" headerrows="2" footerrows="1" }%
| Table with two Header Rows and Footer Row | |||||
|---|---|---|---|---|---|
| Num | Status | Action | Who | When | Progress |
| Num | Status | Action | Who | When | Progress |
| 1 | C | Chose new colors | John | 1-Dec-02 | |
| 2 | X | Release | John | 1-Apr-02 | |
| 3 | Get feedback | Anne | 1-Feb-02 | ||
| 12 | C | Spec error handling | Jack | 1-Dec-02 | |
| 5 | Abc | John | |||
| When |
|---|
| 1-Jan-2004 |
| 1-Jan-2003 |
| 2-Jan-2005 |
TABLEATTRIBUTE settings only write html styling, no CSS
TABLEATTRIBUTE settings can be overridden by a skin's CSS
TABLE tag attributes are converted to CSS styling, written in the head; these override any skin's CSS
.twikiTable
The table
.twikiSortedCol
A sorted column
.twikiSortedAscendingCol
Sorted column, ascending
.twikiSortedDescendingCol
Sorted column, descending
.tableSortIcon
The sort icon holder (span)
.twikiFirstCol
The first column
.twikiTableEven
Even numbered rows
.twikiTableOdd
Odd numbered rows
.twikiTableCol + column number
Unique column identifier, for instance: twikiTableCol0
.twikiTableRow + type + row number
Unique row identifier, for instance: twikiTableRowdataBg0
%<plugin>_<setting>%, for example, %TABLEPLUGIN_SHORTDESCRIPTION%
data/debug.txt. Default: 0 all, all tables that have a header row (including those that do not have %TABLE before them) will be made sortable. If set to none, only tables with %TABLE will be sortable. Topic rendering is faster if this is set to none. TablePlugin.zip in your twiki installation directory. Content: | File: | Description: |
|---|---|
data/TWiki/TablePlugin.txt | Plugin topic |
data/TWiki/VarTABLE.txt | TABLE variable documentation topic |
lib/TWiki/Plugins/TablePlugin.pm | Plugin Perl module |
lib/TWiki/Plugins/TablePlugin/Core.pm | Plugin core module |
disableallsort so plugins such as EditTablePlugin can temporarily disable all sorting for a table. Additionally the CGI variable (URL parameter or hidden formfield) sort can be set to "off" which disables all header sorting in the topic. This is used by plugins such as EditTablePlugin to disable the sorting by clicking header fields during editing of tables. Ref: TWikibug:Item5135 and TWikibug:Item2690.
thead, tfoot and tbody; corrected id parameter.
tablerules on Internet Explorer.
datacolor and databgcolor.
tablerules.
cellborder.
headervalign and datavalign.
id, summary and caption
|^| rule for multi row span (TWiki:Main/WalterMundt); added tableframe and tablerules (TWiki:Main/JohannesMartin); ignore columnwidths for multi column span; validate headerrows and footerrows (TWiki:Main/DarrylGreen); fixed link color problem and up/down icon color problem for dark header background
| PackageForm | |
|---|---|
| TopicClassification | PluginPackage |
| TestedOnTWiki | 6.1, 6.0, 5.1, 5.0, 4.3, 4.2, 4.1, 4.0.0, 01 Feb 2003, 01 Dec 2001, 01 Sep 2001 |
| TestedOnOS | OsLinux, OsSolaris, OsWin2K |
| ShouldRunOnOS | AnyOS |
| InstalledOnTWikiOrg | Yes |
| DemoUrl | |
| DevelopedInSVN | Yes |
| ModificationPolicy | PleaseFeelFreeToModify |
| RelatedTopics | |
| I | Attachment | History | Action | Size | Date | Who | Comment |
|---|---|---|---|---|---|---|---|
| Unknown file formatmd5 | TablePlugin.md5 | r43 r42 r41 r40 r39 | manage | 0.2 K | 2021年03月20日 - 03:45 | PeterThoeny | |
| Compressed Zip archivetgz | TablePlugin.tgz | r42 r41 r40 r39 r38 | manage | 21.9 K | 2021年03月20日 - 03:45 | PeterThoeny | |
| Compressed Zip archivezip | TablePlugin.zip | r57 r56 r55 r54 r53 | manage | 24.7 K | 2021年03月20日 - 03:45 | PeterThoeny | |
| Unknown file formatext | TablePlugin_installer | r11 r10 r9 r8 r7 | manage | 3.5 K | 2021年03月20日 - 03:45 | PeterThoeny |