친구,젠드에서 페이지 매기기
젠드 프레임 워크에서 페이지 매김을 만들고 싶습니다. 나는 ZF에 처음 온 사람입니다.
index.phtml이
<table>
<tr>
<th>Name</th>
<th>Quantity</th>
<th> </th>
</tr>
<?php foreach($this->orders as $order) : ?>
<tr>
<td><?php echo $this->escape($order->name);?></td>
<td><?php echo $this->escape($order->quantity);?></td>
<td>
<a href="<?php echo $this->url(array('controller'=>'index','action'=>'edit', 'id'=>$order->id));?>">Edit</a>
<a href="<?php echo $this->url(array('controller'=>'index', 'action'=>'delete', 'id'=>$order->id));?>">Delete</a>
</td>
</tr>
<?php endforeach; ?>
</table>
<p><a href="<?php echo $this->url(array('controller'=>'index','action'=>'add'));?>">Add new album</a></p>
내 인덱스 컨트롤러 아래에 주어진다 아래 내가 내 ZF 프로젝트에서 무슨에 당신이 기반 도우려고
class IndexController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
$this->view->title = "My Orders";
$this->view->headTitle($this->view->title, 'PREPEND');
$orders = new Model_DbTable_Orders();
$this->view->orders = $orders->fetchAll();
}
}
나는 하나의 회신을 받았는데 내가 노력 만 부분 output.I는 'pagination.phtml'을 만들 생각 얻을에 저장 '뷰/스크립트 /'내 색인에 주어진 줄을 추가 .phtml '$ this-> paginationControl ($ this-> paginator,'Sliding ','pagination.phtml ');하지만 처음 10 개 항목 만 표시되고 다음 - 이전 링크는 표시되지 않습니다. 어떻게 해결합니까? – Rakes