• Resolved David

    (@dtcblyth)


    Hi Tobias,

    Thank you for you wonderful plugin and for your dedication to answering these support questions. I apologise in advance if my question has been asked before. I’ve searched the forum and documentation but couldn’t find a definitive answer.

    My question is, are there equivalent shortcode and/or Template Tag Function parameters for the “Show N rows per page” and “Enable horizontal scrolling” options which are found in the DataTables options on the table edit screen?

    Kind regards,
    David.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Yes, you can set these via the Shortcode parameters:

    [table id=123 datatables_scrollx=true datatables_lengthchange=false /]
    

    Set these to true or false as desired. This will then override the settings from this table’s “Edit” screen.

    Regards,
    Tobias

    Thread Starter David

    (@dtcblyth)

    Hello again,

    Thanks for your super quick response.

    The datatables_scrollx parameter is new to me, so thanks for explaining that. However, the datatables_lengthchange I’m already familiar with as it controls the visibility of the number of rows select field on the front end. What I’m enquiring about is the “Show X rows per page” option which is part of the “Pagination” option on the back-end.

    Kind regards,
    David.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi David,

    so do you want to turn off Pagination or do you want to set a different number of visible rows via the Shortcode?
    The parameters for that would be

    datatables_paginate=false
    

    and

    datatables_paginate_entries=20
    

    Regards,
    Tobias

    Thread Starter David

    (@dtcblyth)

    Hi Tobias,

    Yes, I want to set a different number of visible rows via the Shortcode. The datatables_paginate_entries parameter is working for me. Thanks! 🙂

    Is this in the documentation somewhere? I’m just looking here: https://tablepress.org/documentation/ … under The Shortcode toggle and can’t see it.

    Kind regards,
    David.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    good to hear that this helped! And yes, good catch… It’s missing in the documentation right now. Thanks for letting me know!

    Best wishes,
    Tobias

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

The topic ‘Shortcode Parameters for Rows Per Page and Horizontal Scrolling’ is closed to new replies.