Skip to content

Instantly share code, notes, and snippets.

@KorsaR-ZN
Created July 3, 2015 17:57
Show Gist options
  • Save KorsaR-ZN/7559e4e7be252d19e606 to your computer and use it in GitHub Desktop.
Save KorsaR-ZN/7559e4e7be252d19e606 to your computer and use it in GitHub Desktop.
<ul class="pagination">
<li <?= ($pagination['isFirst'] ? 'class="disabled"' : '') ?>>
<a href="<?= $pagination['prev_url'] ?>" class="btn-page btn-page-next"
data-start="<?= $pagination['prev_num'] ?>">
&laquo;
</a>
</li>
<?php foreach($pagination['pages'] as $page): ?>
<li class="<?= $page['class'] ?>">
<?php if(!$page['isSeparator']): ?>
<a href="<?= $page['url'] ?>" class="btn-page page-<?= $page['num'] ?>"
data-start="<?= $page['num'] ?>">
<?= $page['num'] ?>
</a>
<?php else: ?>
<a href="#" onclick="return false">
<?= $page['num'] ?>
</a>
<?php endif; ?>
</li>
<?php endforeach ?>
<li <?= ($pagination['isLast'] ? 'class="disabled"' : '') ?>>
<a href="<?= $pagination['next_url'] ?>" class="btn-page btn-page-prev"
data-start="<?= $pagination['next_num'] ?>">
&raquo;
</a>
</li>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment