• Resolved xen0chr0me

    (@xen0chr0me)


    Maybe its not your domain but I have a question around pagination.

    I have a large number of rows, around 1000. From an SEO perspective what is preferred, infinite scroll or pagination?

    also, I see that the way pagination works by default is, it gives previous next. Is it possible to get numbered tab like 1…10?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    I don’t think it really matters from an SEO perspective, because the table content is still part of the HTML page, so that bots will see it.

    To get 1…10 in the pagination instead of Previous/Next, please add this to the “Custom Commands” text field on the table’s “Edit” screen:

    "pagingType": "numbers"
    

    For other possible values, please see https://datatables.net/reference/option/pagingType

    Regards,
    Tobias

    Thread Starter xen0chr0me

    (@xen0chr0me)

    I think my theme may be at play here. whenever I click on the pagination button (number) or when previous next was there. It’s changing the page but also scrolling down that page. not sure why.

    I think you will understand if you navigate the page and click the page button.

    https://bit.ly/2KouYmT

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    yes, I see what you mean. But actually, no scrolling is taking place. The reason for this is that the height of the table changes when switching the pages, because the rows have different height.
    To work around this, you could move the pagination controls (the clickable numbers) to the top of the table, so that this effect would not noticable.
    You can do that by extending the “Custom Command” to

    "pagingType": "numbers", "dom": "lfprti"
    

    (This follows the documentation at https://datatables.net/reference/option/dom .)

    Regards,
    Tobias

    Thread Starter xen0chr0me

    (@xen0chr0me)

    ok that worked, but moving it on top, caused the A-Z filter to disappear. Its down to space available i assume.

    Thread Starter xen0chr0me

    (@xen0chr0me)

    may be a stupid thing to ask, but can i fix the width of the cell to the cell with max width so this behaviour is resolved ?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    ah, I forgot about the Alphabet search. To keep that, please try

    "pagingType": "numbers", "dom": "Alfprti"
    

    Fixing the width will not help here. The problem is the cell height. But making that equal for all cells will look ugly.

    Regards,
    Tobias

    Thread Starter xen0chr0me

    (@xen0chr0me)

    makes sense ?? no worries. I can live with it :). Thanks a ton ?? as always :).

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Table Pagination’ is closed to new replies.