In the site that I took on a client, some pages have a paging scheme. For example, a news page showing a record of 100 news stories appears 7 news stories per page. The pagination will show me from 1 to 15. Here is the pre-defined paging code:
<?php if(@$data['quantidade_paginas'] > 1){;?>
<div class="blocoPaginacao">
<div class="paginacao">
<span pg="anterior" class="btnSetaVoltar" style="opacity: 0"></span>
<span pg="anterior" class="linkControle font12" style="opacity: 0"> ANTERIOR </span>
<ul class="btsPaginacao">
<?php for($i=1; $i<=$data['quantidade_paginas']; $i++){ ?>
<li>
<span pg="<?php echo $i?>" pagina_="<?php echo $i?>" class="btnPaginar<?php echo ($i==1 ? ' Sel' : ''); ?>"> <?php echo $i?> </span>
</li>
<?php } ?>
</ul>
<span pg="proxima" class="linkControle font12"> PRÓXIMA </span>
<span pg="proxima" class="btnSetaAvancar"></span>
</div>
<input type="hidden" id="total_paginas" value="<?php echo $i-1?>">
<input type="hidden" id="pagina_atual" value="1">
</div>
<?php } ?>
The problem is if I have about 50 pages. The paging scheme will show me 50 page numbers so I can choose. I wanted it to appear only from 1 to 10, for example. And clicking from 10, for example, start appearing from 11 to 19 and so on.
What will it be like?