Created
December 20, 2013 07:56
-
-
Save kaizhuQin/8051682 to your computer and use it in GitHub Desktop.
zf:pagination
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
分页导航区的链接,独立出来。应用与单独对导航区进行布局与修饰 2013-1-16 | |
--> | |
<!-- 首页链接 --> | |
<div class="pagination"> | |
<ul> | |
<li><a href="<?php echo $this->url(array('page'=>$this->first));?>" title="首页">首页</a></li> | |
<!-- 上一页链接 --> | |
<li><a href="<?php echo $this->url(array('page' => $this->previous)); ?>" title="上一页">上一页</a></li> | |
<!-- 数字页码链接 --> | |
<?php | |
foreach ($this->pagesInRange as $page){ | |
if ($page != $this->current){ | |
$url=$this->url(array('page' => $page)); | |
echo " | |
<li><a href=\"$url\" title=\"$page\">$page</a></li> | |
"; | |
} else { | |
echo " | |
<li class=\"active\" ><a href=\"#\" title=\"$page\">$page</a></li> | |
"; | |
} | |
} | |
?> | |
<!-- 下一页链接 --> | |
<li><a href="<?php echo $this->url(array('page' => $this->next,'numPage'=> $this->currentItemCount)); ?>" title="下一页">下一页</a></li> | |
<!-- 尾页链接 --> | |
<li><a href="<?php echo $this->url(array('page'=>$this->last));?>" title="尾页">尾页</a></li> | |
</ul> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment