花样分页代码

              <div class="list-loadmore row">
                <div class="col-6 text-start">
                    <x class="btn btn-sm btn-secondary"><?php if($this->_currentPage>0) echo '第 '.$this->_currentPage.' 页 / 共 '; ?><?php echo ceil($this->getTotal() / $this->parameter->pageSize); ?> 页</x>
                </div>
                <div class="col-6 text-end">
                <?php $this->pageLink('<x class="btn btn-sm btn-primary me-3">上一页</x>'); ?>
                <?php $this->pageLink('<x class="btn btn-sm btn-primary">下一页</x>','next'); ?>
                </div>
              </div>
<?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'); ?>
评论已关闭

Website Advertises

小夜博客
烈火前端
逍遥博客