Sunday, 30 August 2015

Drupal Datatables module installation and usage

Install drupal Datatables plugin

Go to the web page: https://www.drupal.org/project/datatables
Use drupal update manager to install the module
Enable the module

Install JQuery Datatables

Go to JQuery Datatables  website: https://www.datatables.net/
Download the latest version
Unzip the downloaded plug-in and copy it to sites/all/libraries/datatables(datatables is a case-sensitive folder name which should be paid attention to)

Check whether JQuery Datatables was installed properly

Check whether the path of 'sites/all/libraries/datatables/media/js/jquery.dataTables.js' exists or not
Go to Drupal Admin page of 'admin/reports/status' and search 'datatables'. If there is no warning or error, it means the plug-in has been installed properly.

Use the Drupal Datatable module in drupal view

Go to Drupal admin page of admin/structure/views.
Click 'Add a new view' link
In the drop-down list of 'display format', the 'Data Tables' can be found.
Choose 'Data Tables' as the format and add some content for the view
You will see the paginated data table when you open the view on the front-end website

No comments:

Post a Comment