Truncate number of pages in pagination

前端 未结 4 951
没有蜡笔的小新
没有蜡笔的小新 2021-01-16 18:44

This might be a quite silly question, but I can\'t figure anything out that might help me go further. I\'m looking to shorten the number of NUMBERS in my page navigation.

4条回答
  •  再見小時候
    2021-01-16 19:23

    What you might want to do is use the "logarithmic" pagination technique described in my answer here:

    How to do page navigation for many, many pages? Logarithmic page navigation

    If you set LINKS_PER_STEP to a low value like 2 or 3, it'll produce very compact output.

提交回复
热议问题