Can I integrate DataTables with Twig?

Can I integrate DataTables with Twig?

jquijadojquijado Posts: 24Questions: 6Answers: 0

This is the question. Most of actual applications are developed with Symfony (or other PHP framework). It would be so interesting to be able to integrate DataTables with Twig and Symfony.
Is that possible? Is there any documentation about it?

Thanks everyone.

Answers

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    I don't think the framework really makes much difference to be honest. DataTables is a client-side library. If you have an HTML table just use:

    $('#myTable').DataTable();
    

    to initialise the table. See also the manual for further details on how to initialise and use DataTables.

    Allan

This discussion has been closed.