花样分页代码

2016-02-05
<?php if($this->_currentPage>1): ?><?php endif; ?>
<?php if($this->_currentPage<$this->getTotal() / $this->parameter->pageSize): ?><?php endif; ?>

分页代码:

<?php $this->pageNav('Newer', 'Older', 1, '...', array('wrapTag' => 'nav', 'wrapClass' => 'page-nav', 'itemTag' => '', 'prevClass' => 'extend prev', 'nextClass' => 'extend next', 'currentClass' => 'page-number current' )); ?>

个性代码A:

<nav class="blog-nav">
  <ul class="pagination">
    <li>
      <?php $this->pageLink('<x aria-label="Previous"><span aria-hidden="true">上一页</span></x>'); ?>
    </li>
    <li><span class="nav_pagenum"><?php if($this->_currentPage>1) echo $this->_currentPage;  else echo 1;?> / <?php echo ceil($this->getTotal() / $this->parameter->pageSize); ?></span></li>
    <li>
      <?php $this->pageLink('<x aria-label="Next"><span aria-hidden="true">下一页</span></x>','next'); ?>
    </li>
  </ul>
</nav>

个性代码A演示图片:

<?php $this->pageLink('Previous'); ?>
<span class="page-number"><?php if($this->_currentPage>0) echo 'Page '.$this->_currentPage.' of '; ?><?php echo ceil($this->getTotal() / $this->parameter->pageSize); ?></span>
<?php $this->pageLink('Next','next'); ?>