• Resolved digiblogger

    (@digiblogger)


    One of the greatest DataTables Features is ne numbered pagination on top/bottom of the table.

    With about 1000 table entried, users have to click a lot on “previous” or “next” in TablePress, to reach other pages.

    Can I switch the pagination to numbered on top/bottom?

    • This topic was modified 9 years, 3 months ago by digiblogger.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Yes, this is possible, and only requires a small “Custom Command” on the table’s “Edit” screen. For example, you can use
    "pagingType": "full_numbers"

    The possible values are explained at http://datatables.net/reference/option/pagingType (as you have probably found already).

    Regards,
    Tobias

    Thread Starter digiblogger

    (@digiblogger)

    I found these, thank you.

    And is there also a custom paramter to include the styling like shown here:

    https://datatables.net/

    I am talking about the button pagination.

    Thread Starter digiblogger

    (@digiblogger)

    Done.

    I added these to custom CSS and it works like a charme

    
    .dataTables_wrapper .dataTables_paginate .paginate_button {
      box-sizing: border-box;
      display: inline-block;
      min-width: 1.5em;
      padding: .5em 1em;
      margin-left: 2px;
      text-align: center;
      text-decoration: none !important;
      cursor: pointer;
      *cursor: hand;
      color: #333 !important;
      border: 1px solid transparent;
      border-radius: 2px;
    }
    .dataTables_wrapper .dataTables_paginate .paginate_button.current,
    .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
      color: #333 !important;
      border: 1px solid #979797;
      background-color: #fff;
      background: -webkit-gradient(linear,left top,left bottom,color-stop(0%,#fff),color-stop(100%,#dcdcdc));
      background: -webkit-linear-gradient(top,#fff 0%,#dcdcdc 100%);
      background: -moz-linear-gradient(top,#fff 0%,#dcdcdc 100%);
      background: -ms-linear-gradient(top,#fff 0%,#dcdcdc 100%);
      background: -o-linear-gradient(top,#fff 0%,#dcdcdc 100%);
      background: linear-gradient(to bottom,#fff 0%,#dcdcdc 100%);
    }
    .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
      color: white !important;
      border: 1px solid #111;
      background-color: #585858;
    }
    
    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    good to hear that this helped! Yes, in order to adjust the styling, you can just copy the CSS code.

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Numbered Navigation’ is closed to new replies.