Best way to get total # of pages?

Best way to get total # of pages?

datatablesn00bdatatablesn00b Posts: 7Questions: 0Answers: 0
edited June 2010 in General
Re,

I would like to add an option to change pages from a drop-down menu and presently use server-side processing to get the total # of pages:

[code]
$iTotalPages = round($iFilteredTotal /$_GET['iDisplayLength']);
...
$sOutput .= '"iTotalPages": '.$iTotalPages .' , ';
...
[/code]

I then use fnServerData to assign json['iFilteredTotal'] to total_pages that's used in my further code.

Is there a simpler way of doing that? I've yet to understand how APIs work and how to get the data from the plugin itself.

Thanks!
This discussion has been closed.