I'm currently utilizing will_paginate to manage a large number of values, but I am struggling to find a way to hide the "..." portion and the page numbers following it. Here is my current setup: https://i.stack.imgur.com/f2Tt8.jpg
However, what I would like to achieve is:
< 1 2 3 4 >
After clicking next, I want to see
< 2 3 4 5 >
(In both scenarios, we do not want to display ".." followed by 95 96 97.)
Do you have any suggestions on how this can be achieved? Below is the relevant HTML code:
<div class="pagination full">
<span class="previous_page disabled">< Previous</span>
<em class="current">1</em>
<a rel="next" href="/student/search?page=2">2</a>
<a href="/student/search?page=3">3</a>
<a href="/student/search?page=4">4</a>
<a href="/student/search?page=5">5</a>
<a href="/student/search?page=6">6</a>
<a href="/student/search?page=7">7</a>
<a href="/student/search?page=8">8</a>
<a href="/student/search?page=9">9</a>
<span class="gap">…</span>
<a href="/student/search?page=95">95</a>
<a href="/student/search?page=96">96</a>
<a href="/student/search?page=97">97</a>
<a class="next_page" rel="next" href="/student/search?page=2">Next ></a>
</div>
Thank you!