Remove "fixed" first and last page number on pagination

Remove "fixed" first and last page number on pagination

lpklpk Posts: 2Questions: 1Answers: 0

Hi all,
the problem I'm experiencing is that I can't find a built-in option to remove the first and last page number (not the "First" and "Last" buttons - the number ones). It is always fixed.

For example: http://live.datatables.net/yosavasa/
If you go to page 5, there are the buttons "First", "1", "4", "5", "6", "15" and "Last". I want to know if there's a way to remove the "1" and "15" buttons.

Thanks!

Answers

  • kthorngrenkthorngren Posts: 20,276Questions: 26Answers: 4,765

    Not sure if there plugin that meets your needs but they may provide you with the info needed to create what you want:
    https://datatables.net/plug-ins/pagination/

    Kevin

  • allanallan Posts: 61,667Questions: 1Answers: 10,096 Site admin

    I want to know if there's a way to remove the "1" and "15" buttons.

    You could hide the active button using CSS, but there isn't a way to hide the first and last buttons with the built in options. As Kevin mentions you'd need to have a custom plug-in that will do that - and I don't think that there is one that does explicitly that at the moment, so you'd need to write it.

    Allan

  • lpklpk Posts: 2Questions: 1Answers: 0

    Thanks for the answer! I'll take a look at it and, if really needed, write a custom plug-in.

    Cheers!
    Leo

  • Lakshan KariyawasamLakshan Kariyawasam Posts: 1Questions: 0Answers: 0

    How to do that...

  • GiangTruongGiangTruong Posts: 4Questions: 1Answers: 0

    Same question ? How to do that sirs?

This discussion has been closed.