本文介绍了将参数传递给zend paginationControl部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个页面可以显示很多数据,包括Zend_Paginator.页面操作为/po/fetch?id=someID.

I have a page that displays a lot of data, including Zend_Paginator.The page action is /po/fetch?id=someID.

我想要做的是将"id"参数传递给zend paginationControl,因此分页链接将类似于/po/fetch?id=someID&page=somePage.不幸的是,我找不到任何有关如何将该参数传递给paginationControl的解释.

what i want to do is to pass the "id" parameter to zend paginationControl so the pagination links will be something like /po/fetch?id=someID&page=somePage. unfortunally i can't find anywhere explanation on how i can pass that parameter to the paginationControl.

我对paginationControl的呼叫:

my call to paginationControl:

echo $view->paginationControl($paginator, 'Sliding',$control, $params);

其中$params = array('id' => someID

我的分页为:

<a href=<?= $url.'&page='.$this->first; ?> id="first"> First </a>

<a href=<?= $url.'&page='.$this->previous; ?> id="previous">&lt; Previous</a>

<?php
foreach($this->pagesInRange as $page) {
?>
        <a href="<?= $url.'&page='.$page; ?>">.$page.</a>  | ;
<?php
}
?>

<a href=<?= $url.'&page='.$this->next;?> id="next"> Next &gt;</a>

<a href=<?= $url.'&page='.$this->last; ?> id="last"> Last </a>

,我希望$url采用指定格式.

and I want $url to be of the specified form.

推荐答案

$this->id

这篇关于将参数传递给zend paginationControl部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-15 11:36