Configuration
1 / Create a source
First select Sharepoint under PDIR in the left navigation. Then create a new Sharepoint source with the button “Create a new Sharepoint list”.
Enter all list and Sharepoint settings (example: figure 1).
Figure 1: Create a new Sharepoint source (example data)
2 / Create a module
Create a new module of type “Sharepoint - DataTables” in your theme. In the module, select the source you just created under Data source and enter under Main node the node that contains the data in the file.
You can choose how many entries per page are shown, which values the select box offers for the entries per page, and whether a pagination or a search field is displayed.
In the table you can add new rows or columns with the plus icons (see figure 2). The first row of the table is always used as the header. In the second row you define which data from the imported file is shown in which column. Several entries in one column can be given comma-separated (without spaces). In the table they are then output separated by a space.
With the field “Sort by field” you can sort ascending or descending by a field name (as named in the 2nd row of the table). Under Expert settings you can assign an ID or a class. An ID is not required. If none is given, the module generates one itself.
Finally, include the module in an article.
Figure 2: Create a new table (example data)
Custom adjustments
You can make custom adjustments in the template mod_datatables.html5. Simply place the template in your templates folder. In the module you can then select a custom template under template settings.
In the second row of the table you can also leave columns at the beginning or end empty. They are ignored when the table is output. This lets you add your own columns in the template.
Cron job
By editing localconfig.php in system/config you can set up a cron job that runs at different intervals. Simply add one of the following lines to the file.
Every minute:
$GLOBALS['TL_CRON']['minutely'][] = ['Pdir\ContaoSharepointBundle\EventListener\CronListener', 'loadFile'];Hourly:
$GLOBALS['TL_CRON']['hourly'][] = ['Pdir\ContaoSharepointBundle\EventListener\CronListener', 'loadFile'];Daily:
$GLOBALS['TL_CRON']['daily'][] = ['Pdir\ContaoSharepointBundle\EventListener\CronListener', 'loadFile'];Weekly:
$GLOBALS['TL_CRON']['weekly'][] = ['Pdir\ContaoSharepointBundle\EventListener\CronListener', 'loadFile'];Monthly:
$GLOBALS['TL_CRON']['monthly'][] = ['Pdir\ContaoSharepointBundle\EventListener\CronListener', 'loadFile'];Language file
The matching language file is loaded based on the Contao website settings. Language files that are not loaded can be specified in the template. You find all language files here: list of supported languages. Click a language to find the URL of its language file under CDN, which you then include in the template. To do so, change the following line in the JavaScript code of the template (in this example for Norwegian Bokmål):
"language": {
"url": "//cdn.datatables.net/plug-ins/1.10.16/i18n/Norwegian-Bokmal.json"
},More examples and documentation for the DataTables table plugin are available at datatables.net.

