CommunityID/modules/news/views/scripts/index/pagination.phtml

37 lines
1.1 KiB
PHTML

<!--
See http://developer.yahoo.com/ypatterns/pattern.php?pattern=searchpagination
-->
<?php if ($this->pageCount): ?>
<div class="paginationControl">
<!-- Previous page link -->
<?php if (isset($this->previous)): ?>
<a href="<?php echo $this->base . '/news?page=' . $this->previous ?>">
&lt; <?php echo $this->translate('Previous') ?>
</a> |
<?php else: ?>
<span class="disabled">&lt; <?php echo $this->translate('Previous') ?></span> |
<?php endif ?>
<!-- Numbered page links -->
<?php foreach ($this->pagesInRange as $page): ?>
<?php if ($page != $this->current): ?>
<a href="<?php echo $this->base . '/news?page=' . $page ?>">
<?php echo $page; ?>
</a> |
<?php else: ?>
<?php echo $page; ?> |
<?php endif ?>
<?php endforeach ?>
<!-- Next page link -->
<?php if (isset($this->next)): ?>
<a href="<?php echo $this->base . '/news?page=' . $this->next ?>">
<?php echo $this->translate('Next') ?> &gt;
</a>
<?php else: ?>
<span class="disabled"><?php echo $this->translate('Next') ?> &gt;</span>
<?php endif ?>
</div>
<?php endif ?>