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
视频教程 | 常用手册 | 常用广告代码 | js特效代码 |
如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛