wiki:datatables_plugin

DataTables plugin

DataTables plugin page

This plugin makes regular DokuWiki tables sortable and searchable. It's written by the same developer as the bootstrap3 theme, Bootstrap Wrapper, and Advanced plugins, so it works well in that milieu.

In the default case, simply enclose a standard table in <datatables> tags, as follows:

<datatables>
^ Make table ^ As usual ^
| 123        | 456      |
</datatables>

In HârnWiki, this is often used with several options included in the opening tag. For instance, the Kaldor and Atlas Keléstia works pages look like this.

<datatables info="false" paging="false">

The info=“false” option suppresses the “Showing 1 thru X of X entries” message below the table, and the paging=“false” forces all lines to be displayed rather than the first 10 along with buttons to navigate further.

On the Atlas Hârnica works page, another option is in evidence.

<datatables info="false" paging="false" order='[[0, "asc"]]'>

This may not strictly be necessary anymore, since this is merely the default value for the order setting. However—though it's been some time and memory fades—it may have been useful earlier, before all of the pages in that column had been created, to force the proper sorting of present and missing ones.

Other plugins have been considered for this role and may very well be preferable in some instances, should circumstances allow. They are discussed on their own pages, sortablejs plugin and database2 plugin.

  • wiki/datatables_plugin.txt
  • Last modified: 2023/02/18 06:44
  • by suedunham