42 lines
1.8 KiB
PHTML
42 lines
1.8 KiB
PHTML
<?php if ($this->pageCount): ?>
|
|
<?php $route = "news"; ?>
|
|
<?php $query = isset($_GET) && count($_GET) ? "?".http_build_query($_GET) :"" ; ?>
|
|
<div class="pagination">
|
|
<ul>
|
|
<?php if (isset($this->previous)): ?>
|
|
<li class="first"><a href="<?= $this->url($route, array('page' => $this->first),false,true); ?><?= $query ?>"><< First</a></li>
|
|
<?php else: ?>
|
|
<li class="prev disabled"><a href="javascript:void(0);"><< First</a></li>
|
|
<?php endif; ?>
|
|
<!-- Previous page link -->
|
|
<?php if (isset($this->previous)): ?>
|
|
<li class="prev"><a href="<?= $this->url($route,array('page'=>$this->previous),false,true) ?><?= $query ?>">< Previous</a></li>
|
|
<?php else: ?>
|
|
<li class="prev disabled"><a href="javascript:void(0);">< Previous</a></li>
|
|
<?php endif; ?>
|
|
|
|
<!-- Numbered page links -->
|
|
<?php foreach ($this->pagesInRange as $page): ?>
|
|
<?php if ($page != $this->current): ?>
|
|
<li><a href="<?= $this->url($route,array('page'=>$page),false,true) ?><?= $query ?>"><?= $page; ?></a></li>
|
|
<?php else: ?>
|
|
<li class="active"><a href="javascript:void(0);"><?= $page; ?></a></li>
|
|
<?php endif; ?>
|
|
<?php endforeach; ?>
|
|
|
|
<!-- Next page link -->
|
|
<?php if (isset($this->next)): ?>
|
|
<li class="next"><a href="<?= $this->url($route,array('page'=>$this->next),false,true) ?><?= $query ?>">Next ></a></li>
|
|
<?php else: ?>
|
|
<li class="next disabled"><a href="javascript:void(0);">Next ></a></li>
|
|
<?php endif; ?>
|
|
|
|
<!-- Last page link -->
|
|
<?php if (isset($this->next)): ?>
|
|
<li class="last"><a href="<?= $this->url($route, array('page' => $this->last),false,true); ?><?= $query ?>">Last >></a></li>
|
|
<?php else: ?>
|
|
<li class="last disabled"><a href="javascript:void(0);">Last >></a></li>
|
|
<?php endif; ?>
|
|
</ul>
|
|
</div>
|
|
<?php endif; ?> |