Zend_Paginator分页效果实例
index.phtml
<? if (count($this->paginator)): ?>
<dl>
<!-- Loop through the entries that were provided to us by the controller -->
<? foreach ($this->paginator as $entry): ?>
<dt><?= $this->escape($entry['ART_NO']) ?></dt>
<dd><?= $this->escape($entry['SELL_PR']) ?></dd>
<img height="29" alt="logo" src="images/b_add_to_cart.gif" width="92" border="0" />
<? endforeach ?>
</dl>
<? endif ?>
<?= $this->paginationControl($this->paginator, 'Sliding', 'index/pagelist.phtml'); ?>
pagelist.phtml
<?php if ($this->pageCount): ?>
<div class="paginationControl">
<!-- Previous page link -->
<?php if (isset($this->previous)): ?>
<a href="<?= $this->url(array('page' => $this->previous)); ?>">< 上一页</a> |
<?php else: ?>
<span class="disabled">< 上一页</span> |
<?php endif; ?>
<!-- Numbered page links -->
<?php foreach ($this->pagesInRange as $page): ?>
<?php if ($page != $this->current): ?>
<a href="<?= $this->url(array('page' => $page)); ?>"><?= $page; ?></a> |
<?php else: ?>
<?= $page; ?> |
<?php endif; ?>
<?php endforeach; ?>
<!-- Next page link -->
<?php if (isset($this->next)): ?>
<a href="<?= $this->url(array('page' => $this->next)); ?>">下一页 ></a>
<?php else: ?>
<span class="disabled">下一页 ></span>
<?php endif; ?>
</div>
<?php endif; ?>
控制文件
class IndexController extends Zend_Controller_Action
{
protected
未来的中国站长, 更加专注中国网络的发展
广告服务 |
最新更新 |
加入收藏 | 设为首页
- 首页
- 互联网软件
- IDC产品
- 站长交易
- 项目外包
- 商业信息
- 招聘求职
- 公司库
- 资 讯
- 下 载
- 学 院
- 工 具
- 论 坛
| 视频教程 | 常用手册 | 常用广告代码 | js特效代码 |
Zend_Paginator分页效果实例
2010-1-10 18:10:00查看学习心得 {GetProperty(Content)} 本文作者:未知生产内容,同时打通搜索引擎(SEO)与AI搜索引擎(GEO)流量入口的软件! 点击进入365建站器 »
