Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== DataTables plugin ====== [[doku>plugin:datatables|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. ===== Basic use ===== In the default case, simply enclose a standard table in ''%%<datatables>%%'' tags, as follows: <code> <datatables> ^ Make table ^ As usual ^ | 123 | 456 | </datatables> </code> ===== Particular use cases ===== In HârnWiki, this is often used with several options included in the opening tag. For instance, the [[harn:kaldor:]] and [[works:atlas_kelestia:]] pages look like this. <code> <datatables info="false" paging="false"> </code> 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 [[works:atlas_harnica:]] page, another option is in evidence. <code> <datatables info="false" paging="false" order='[[0, "asc"]]'> </code> 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. ===== Alternative plugins ===== 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:44by suedunham