Create a Interactive Data Table
The Cascade CMS theme is bundled with DataTables. DataTables is a plug-in for the jQuery Javascript library. Because tables are best used to display tabular data on your page, the DataTable plug-in is an easy way to add advanced interaction controls to any table.
Instructions
Using any template, create your table and add any custom formatting.
Your table must include the following HTML markup:
thead
andtbody
. If you do not include these elements the data table will not include column sort functionality.You must also include the following ID for the
table
element at a minimum:id="data-table"
Code Example:<table class="table table-hover" id="data-table"> <thead> <tr> <th>Column Header</th> <th>...</th> <th>...</th> </tr> </thead> <tbody> <tr> <td>Data Cell</td> <td>...</td> <td>...</td> </tr> </tbody> </table>
Click the Configure tab.
Scroll down to the Regions section and locate the TABLE-EXTENSION path.
Click Choose Block.
In the Choose a block menu, click the Browse tab.
Using the Search field next to your site name, type “Directory Block”
Select the Directory Block.
Click Choose.
Click Preview Draft (blue button at the top of the screen). After previewing the draft, click Submit to save these changes to the CMS.
The page has been successfully saved to the CMS. You must now Publish your page.
The folder path for the Directory Block in the theme is /assets/_cascade/base-assets/Directory Block
For detailed information regarding this plug-in view the DataTables manual and list of examples.
To include additional filters and other functional capability as documented in the DataTables manual, you must edit the Directory Block.
Related articles
-
Create a Interactive Data Table (Cascade CMS KB)
-
Insert a Table Using the WYSIWYG Editor (Cascade CMS - Basic Training)