php Zend公司 - 分页程序のテンプレート
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php Zend公司 - 分页程序のテンプレート相关的知识,希望对你有一定的参考价值。
<?php if ($this->pageCount): ?>
<div class="clearfix">
<div class="pull-left">
<nav>
<ul class="pagination">
<li>
<?= $this->totalItemCount ?>件中
<?= $this->firstItemNumber ?> -
<?= $this->lastItemNumber ?> を表示
<div class="btn-group">
<button type="button" class="btn dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<?= $this->itemCountPerPage ?> 件表示
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a tabindex="-1" href="<?= $this->url($this->route, ['count' => 10], ['query' => $this->query]); ?>">10件表示</a></li>
<li><a tabindex="-1" href="<?= $this->url($this->route, ['count' => 30], ['query' => $this->query]); ?>">30件表示</a></li>
<li><a tabindex="-1" href="<?= $this->url($this->route, ['count' => 50], ['query' => $this->query]); ?>">50件表示</a></li>
<li><a tabindex="-1" href="<?= $this->url($this->route, ['count' => 100], ['query' => $this->query]); ?>">100件表示</a></li>
<li><a tabindex="-1" href="<?= $this->url($this->route, ['count' => 200], ['query' => $this->query]); ?>">200件表示</a></li>
<li><a tabindex="-1" href="<?= $this->url($this->route, ['count' => 500], ['query' => $this->query]); ?>">500件表示</a></li>
</ul>
</div>
</li>
</ul>
</nav>
</div>
<div class="pull-right">
<nav>
<ul class="pagination pagination-sm">
<?php /* 最初のページヘのリンク */ ?>
<li class="<?= isset($this->previous)? '' : 'disabled' ?>">
<a href="<?= $this->url($this->route, ['page' => $this->first, 'count' => $this->itemCountPerPage], ['query' => $this->query]); ?>">
<span>«</span>
</a>
</li>
<?php /* ページ番号へのリンク */ ?>
<?php foreach ($this->pagesInRange as $page): ?>
<li class="<?= $page == $this->current? 'active' : '' ?>">
<a href="<?= $this->url($this->route, ['page' => $page, 'count' => $this->itemCountPerPage], ['query' => $this->query]); ?>">
<?= $page; ?>
</a>
</li>
<?php endforeach ?>
<?php /* 最後のページヘのリンク */ ?>
<li class="<?= isset($this->next)? '' : 'disabled' ?>">
<a href="<?= $this->url($this->route, ['page' => $this->last, 'count' => $this->itemCountPerPage], ['query' => $this->query]); ?>">
<span>»</span>
</a>
</li>
</ul>
</nav>
</div>
</div>
<?php endif; ?>
以上是关于php Zend公司 - 分页程序のテンプレート的主要内容,如果未能解决你的问题,请参考以下文章