=====Extended Table Action Documentation===== >>==See also:== ~-[[http://docs.wikkawiki.org/TableMarkup | table markup]] (since 1.1.7) ~-Development: TableAction.>>This is the documentation page for a proposed **extended table action**. The code is available on the TableAction page. The development of this action has been discontinued since the implementation of a new [[http://docs.wikkawiki.org/TableMarkup | table markup]] in the [[WikkaUnstable | main development line]].::c:: ===Documentation=== ==Short description== Turns a simple list of cell contents into a (data) table. ==Parameters== ""
nametyperequired?defaultdescription
delimitercharoptionalsemicolon (;)delimiter that will be used to separate cells; must be a single character.
delimcharoptional;synonym of delimiter
captionstringoptionalnonetable caption
columnsintegeroptional1number of columns the table is to have.
colsintegeroptional1synonym of columns
borderintegeroptional1borderwidth of table.
cellpaddingintegeroptional3padding within cells in pixels.
cellspacingintegeroptional1space between cells in pixels.
stylestringoptionalnonein-line style for the table.
classstringoptionalnonealternative for style: use the class to style with the stylesheet.
summarystringoptionalnonesummary of what the table contains.
cellsstringrequiredcontent of the table with cells separated by the (defined) delimiter.
"" ==Long description== Wikka markup within cells is interpreted but HTML markup for cell contents is not possible. There is only one required paramater: cells; if this is missing an error message will be displayed, along with the original action markup. It is possible to define cell contents across multiple lines; surrounding whitespace is trimmed before generating output, embedded whitespace (including newlines) is retained. Cell contents must be separated by a delimiter character; by default this is a semicolon, but if this would conflict with cell contents, a delimiter can be defined with the delimiter (or delim) parameter. Superfluous delimiters at the start and end of the cells parameter are discarded, so it's possible to write each cell row on a separate line, and end each cell with the delimiter: this makes it relatively easy to maintain table contents. A caption can be defined, as well as a summary. There is limited support for table headers (th cells): if cell content is embedded in sets of 2 to 5 '=' characters (as in heading markup) these will be discarded and a header cell (th) will be generated instead of a data cell (td). Row groups (thead, tfoot, tbody) are NOT supported. The result is valid (data) table markup although accessibility will be limited. ==Author== JavaWoman ===Examples=== ~- Simple table with "forced" empty cell (""###""):--- ""{{table columns="3" cells="a;b;c;1;###;3"}}""--- {{image url="http://www.xs4all.nl/~iamback/tests/tableaction_samp1.png" alt="sample output table action" title="sample output table action"}} ~- Using delimiter '+' instead of ';' because a cell contains a semicolon; and Wikka heading markup being turned into table header cells: ---""{{table columns="3" cellpadding="1" delim="+" cells="==a==+b+c+==1==+2;3;4;5+6"}}""--- {{image url="http://www.xs4all.nl/~iamback/tests/tableaction_samp2.png" alt="sample output table action" title="sample output table action"}} ~- Header cells created with Wikka heading markup, and Wikka markup (italic, bold and centered) within table cells:--- ""{{table columns="3" cellpadding="2" cells="==a==;==b==;==c==;//1//;**2**;@@3@@"}}""--- {{image url="http://www.xs4all.nl/~iamback/tests/tableaction_samp3.png" alt="sample output table action" title="sample output table action"}} ~- Error message created when required parameter ##cells## is missing:--- ""{{table cols="5" caption="invalid table action"}}""--- {{image url="http://www.xs4all.nl/~iamback/tests/tableaction_samp4.png" alt="sample output table action" title="sample output table action"}} ~- Action across multiple lines, with also newlines separating table rows within the cells parameter; surrounding (extra) delimiters are automatically discarded so each table row, including the last, can be terminated with the (defined) delimiter. Note that the last table row starts with two (implicit) empty cells while the content for the last cell contains a new line (rendered as intended):--- ""{{table cols="3" cellpadding="10" delimiter="\"
cells="\\\\==a==\==b==\==c==\
//1//\**2**\@@3@@\
\\//last
cell//\\"
}}""--- {{image url="http://www.xs4all.nl/~iamback/tests/tableaction_samp5.png" alt="sample output table action" title="sample output table action"}} ---- CategoryDevelopment