"static" Pagination
"static" Pagination
Hi everyone,
my DataTables data is coming from the Perl-script itself (which generates the html page), and it does pagination by default (with ?page=xx parameter) to reduce database load. The data is already in the DOM.
How can I initialize DataTables with:
- giving it the amount of total records
- adding the page parameter to the pagination so that click the page-link just loads the same page with another page parameter?
EDIT: I found https://datatables.net/examples/server_side/custom_vars.html, but this is not useable because the data is already in the DOM.
I guess that the search feature (over all data) will break at this point, but I don't care about that really much.
Many thanks!
This question has an accepted answers - jump to answer
Answers
Hi,
Have a look at this blog post which describes a method of deep linking into DataTables.
Allan
Hi,
thanks for the answer. The missing piece seems now to be how I can tell DataTables that there are thousands of pages available to properly display the pagination. Remeber, the current DOM only holds a short amount of all data.
I did not find out how I can do that with the deep link functionality =/
Thanks
deferLoading
can be used for that. See this example.Allan