Change sInfo Text

Change sInfo Text

some_codersome_coder Posts: 4Questions: 0Answers: 0
edited November 2013 in General
Hi. Using the default settings (with pagination=true and bInfo=true) there is a infotext like "Showing 26 to 51 of 500 entries" at the end of the tables. Is there a way to show the current page instead of the item count? For example i want do display "showing page 1/7" or "showing page 6/7" instead of "showing x to y" entries.

I already found the oLanguage.sInfo (with _START_, _END_ and _TOTAL_) options but i wasn't able to determine the placeholders for the current and total page.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    DataTables 1.10 introduces `_PAGE_` and `_PAGES_` options to values available of the information text, so you could try using that if you like? Its pre-beta, but reasonably solid and feedback is welcome! It should be going into beta early next month.

    You can grab it here: https://github.com/DataTables/DataTables/tree/1_10_wip/media/js

    Allan
  • some_codersome_coder Posts: 4Questions: 0Answers: 0
    Thank you very much. We are currently using dataTables 1.8.1 with jQuery 1.6.1. Due to some restrictions we cannot upgrade to newer version of jQuery. So we are bound to the current version of datatables.
    But i was able to use some code from the existing dataTables codebase to implement this feature in 1.8.1.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    > But i was able to use some code from the existing dataTables codebase to implement this feature in 1.8.1.

    Great to hear :-)

    Allan
This discussion has been closed.