|
> > | |
| Table Plugin
Gives extra control of table display: |
|
-
- A
TABLEATTRIBUTES preferences setting on site-level (TWikiPreferences) or web-level (any WebPreferences), e.g.
-
Set TABLEATTRIBUTES = tableborder="0" cellpadding="1" ...
- Before a table using
%TABLE{...}%
|
|
> > | |
| Sorting |
|
- number is digits, with optional decimal point
- otherwise treated as text
|
|
> > | Row spans
Table cells with a single caret indicate follow-up rows of multi-row spans. For example,
| One One | One Two | One Three |
| ^ | Two Two | Two Three |
| Three One | ^ | Three Three |
|
One One | One Two | One Three |
Two Two | Two Three |
Three One | Three Three |
|
|
| TablePlugin Global Settings
Plugin settings are stored as preferences variables. To reference |
|
- Set DEBUG to 1 to get debug messages in
data/debug.txt . Default: 0
|
|
< < |
- Make sortable:
- #Set SORT = attachments
- Set SORT = all
|
> > |
- Make all tables in a topic sortable. If this is set to
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 .
|
| |
|
> > | |
|
- Default table attributes:
|
|
< < |
-
- Set TABLEATTRIBUTES = tableborder="1" cellpadding="0" cellspacing="1" headerbg="#99CCCC" databg="#FFFFCC, #FFFFFF"
|
> > |
-
- Set TABLEATTRIBUTES = tableborder="0" cellpadding="1" cellspacing="1" headerbg="#dadada" headercolor="#000000" databg="#eaeaea, #ffffff"
- Classic skin table attributes:
- #Set TABLEATTRIBUTES = tableborder="1" cellpadding="0" cellspacing="1" headerbg="#99CCCC" databg="#FFFFCC, #FFFFFF"
|
| Table Attributes |
|
valign | Vertical alignment of cells, set to "top" , "middle" , "bottom" or "baseline" | valign="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 | 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 | dataalign="center" |
|
|
< < |
tablewidth | Table width: Percentage of window width, or absolute pixel value. Default is unspecified | tablewidth="100%" |
columnwidths | Column widths: Comma delimited list of column widths, percentage or absolute pixel value. Default is unspecified | columnwidths="80%, 20%" |
|
> > |
tablewidth | Table width: Percentage of window width, or absolute pixel value. Default is unspecified. | tablewidth="100%" |
columnwidths | Column widths: Comma delimited list of column widths, percentage or absolute pixel value. Default is unspecified. | columnwidths="80%, 20%" |
|
|
headerrows | Number of header rows to exclude from sort; default "1" | headerrows="1" |
footerrows | Number of footer rows to exclude from sort; default "0" | footerrows="1" |
|
|
> > |
id | Table identifier string. Default is unspecified. | 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. Default is unspecified. | summary="List of subscribed users" |
caption | Table caption: A title that will be displayed just above the table. Default is unspecified. | caption="Users" |
|
| The %TABLE{...}% settings override TABLEATTRIBUTES preferences settings, which override the TABLEATTRIBUTES Plugin settings. |
| Use of %TABLE{...}% |
|
< < | Line before table: %TABLE{ sort="on" tableborder="0" cellpadding="1" cellspacing="3" headerbg="#000099" headercolor="#FFFFCC" databg="#C8CB8F, #DBDDB5" headerrows="2" footerrows="1" }% |
> > | Line before table: %TABLE{ sort="on" tableborder="0" cellpadding="1" cellspacing="3" headerbg="#D5CCB1" headercolor="#666666" databg="#FAF0D4, #F3DFA8" headerrows="2" footerrows="1" }% |
| |
|
< < | |
> > | |
|
|
|
Plugin Installation Instructions |
|
< < | Note: You do not need to install anything on the browser to use this plugin. Below installation instructions are for the administrator who needs to install this plugin on the TWiki server. |
> > | This plugin is pre-installed with your TWiki release. You should not have to install it other than to do an upgrade. |
|
- Download the ZIP file from the Plugin web (see below)
- Unzip
TablePlugin.zip in your twiki installation directory. Content:
|
|
pub/TWiki/TablePlugin/diamond.gif | Diamond symbol |
pub/TWiki/TablePlugin/down.gif | Down arrow |
pub/TWiki/TablePlugin/up.gif | Up arrow |
|
|
> > |
- (Dakar) Visit
configure in your TWiki installation, and enable the plugin in the {Plugins} section.
|
|
- Test if the plugin is correctly installed:
- Check above example if the table renders as expected
- Try click on heading to sort. Other tables should also be sortable
|
| Plugin Info
|
|
< < |
Plugin Version: | 01 Aug 2004 |
|
> > |
|
|
Change History: | <-- specify latest version first --> |
|
|
> > |
13 Dec 2005 | AC: Added support for id, summary and caption |
5 Mar 2005 | 1.014: Crawford Currie eliminated deprecated handlers for Dakar |
|
|
01 Aug 2004: | AC: Added CSS support for first column and ascending/descending table headers |
21 Mar 2004: | PTh: Internal change: Fixed reference to unofficial variable |
01 Jan 2004: | PTh: Alternating data row colors restart again after each header row |
|
| Related Topics: TWikiPreferences, TWikiPlugins, StandardColors |
|
< < | -- TWiki:Main/JohnTalintyre - 07 Oct 2001
-- TWiki:Main/PeterThoeny - 01 Aug 2004
|
| |
|
< < |
META FILEATTACHMENT | attr="" comment="Up arrow" date="1070351625" name="up.gif" path="C:\Data\MyTWiki\Plugins\TablePlugin\pub\TWiki\TablePlugin\up.gif" size="867" user="PeterThoeny" version="1.1" |
META FILEATTACHMENT | attr="" comment="Down arrow" date="1070351653" name="down.gif" path="C:\Data\MyTWiki\Plugins\TablePlugin\pub\TWiki\TablePlugin\down.gif" size="867" user="PeterThoeny" version="1.1" |
META FILEATTACHMENT | attr="" comment="Diamond symbol" date="1070351672" name="diamond.gif" path="C:\Data\MyTWiki\Plugins\TablePlugin\pub\TWiki\TablePlugin\diamond.gif" size="881" user="PeterThoeny" version="1.1" |
|
> > |
META FILEATTACHMENT | attr="" comment="Up arrow" date="1070351625" name="up.gif" path="C:\Data\MyTWiki\Plugins\TablePlugin\pub\TWiki\TablePlugin\up.gif" size="867" user="TWikiContributor" version="1.1" |
META FILEATTACHMENT | attr="" comment="Down arrow" date="1070351653" name="down.gif" path="C:\Data\MyTWiki\Plugins\TablePlugin\pub\TWiki\TablePlugin\down.gif" size="867" user="TWikiContributor" version="1.1" |
META FILEATTACHMENT | attr="" comment="Diamond symbol" date="1070351672" name="diamond.gif" path="C:\Data\MyTWiki\Plugins\TablePlugin\pub\TWiki\TablePlugin\diamond.gif" size="881" user="TWikiContributor" version="1.1" |
|