Pagination if i have many pages
I created my own theme. It is based on the theme of the Mars
Pagintaion code:
Code: Select all
<?php if (Paginator::numberOfPages()>1): ?>
<div class="pagi-nav">
<nav class="pgn">
<?php if (Paginator::showPrev()): ?>
<span class="pprev"><a href="<?php echo Paginator::previousPageUrl() ?>">Назад</a></span>
<?php endif ?>
<ul class="navigation">
<?php for ($i=1; $i<=Paginator::numberOfPages(); $i++): ?>
<li><a <?php if (Paginator::currentPage() == $i): ?> class="current" <?php endif ?>href="<?php echo Paginator::numberUrl($i) ?>"><?php echo $i ?></a></li>
<?php endfor ?>
</ul>
<?php if (Paginator::showNext()): ?>
<span class="pnext"><a href="<?php echo Paginator::nextPageUrl() ?>">Вперед</a></span>
<?php endif ?>
</nav>
</div>
<?php endif ?>