Table of Contents
tablelayout Plugin
Compatible with DokuWiki
- 2024-02-06 "Kaos" unknown
- 2023-04-04 "Jack Jackrum" unknown
- 2022-07-31 "Igor" yes
- 2020-07-29 "Hogfather" yes
Set the width of table columns, freeze header rows, float the table, integrates with edittable plugin
Similar to adhoctables, datatables, searchtablejs, sortablejs, tablewidth, wrap
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
Examples/Usage
The following example syntax will make the first fixed and show about 2 other rows in a scrollable container below. It will make the first column 20px wide and the second 30px. The table itself will be floating to the right.
{{tablelayout?colwidth="20px,30px"&rowsHeaderSource=1&rowsVisible=2&float=right}} ^ header 1 ^ header 2 ^ | cell A1 | cell B1 | | cell A2 | cell B2 | | cell A3 | cell B3 |
Syntax
The basic boilerplate is {{tablelayout?options}}
. The options are specified like URL parameters:
Column widths
The option is colwidth
and it expects a "
-wrapped, ,
-separated list of column-widths including the px
unit. If you do not want to define the width of an element use -
.
fixed header rows
You have to specify the two options rowsHeaderSource
and rowsVisible
. The first expects a positive integer specifying the number of rows that are fixed at the top. rowsVisible
sets the number of rows that are visible below the fixed rows.
rowsHeaderSource
can be set to Auto
.
Floating
The option float
takes one of three possible values: left
, right
, center
. left
and right
let the table float to the left or right, center
centers the table on the page.
Search
By setting tableSearch=1
fields will be added above every column and one for the entire table.
Sort
By setting tableSort=1
sort buttons will be added for every column.
By setting tablePrint=1
a print button is added below the table, that opens only the table in a new window and triggers the browser's print dialog.
Development
Commit-Ticker
- Version upped (2022-03-28 23:51)
- Merge pull request #25 from cosmocode/form-event (2022-03-28 16:18)
- Compatibility with upcoming release Igor (2022-03-28 16:15)
- Version upped (2019-06-17 23:51)
- Merge pull request #11 from cosmocode/theadFix (2019-06-17 13:24)
- Fix positioning of filters with additional header rows (2019-06-17 13:10)
- Version upped (2019-06-13 23:51)
- Merge pull request #10 from cosmocode/filters (2019-06-13 17:03)
Releases:
- 2022-03-28 by splitbrainVersion upped
- 2019-06-17 by splitbrainVersion upped
- 2019-06-13 by splitbrainVersion upped
- 2019-06-12 by splitbrainVersion upped
- 2019-05-13 by splitbrainVersion upped
- 2018-04-27 by splitbrainVersion upped
- 2018-01-22 by micgro42bug fixes
- 2017-12-07: Bugfix: works in Dokuwiki-Template again by micgro42And another minor bugfix.
Tips
- Making this work with Internet Explorer requires a polyfill for javascripts
repeat()
function.
The easiest way i know is adding the content of http://gist.github.com/warlock/a614334cad7ffa4fccbeec69afe5a82b to the fileconf/userscript.js
(create the file if it doesn't exist).