passing parameters to zend paginationControl partial

Boris C picture Boris C · Apr 21, 2011 · Viewed 12.2k times · Source

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

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.

my call to paginationControl:

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

where $params = array('id' => someID

and my pagination partial is:

<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>

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

Answer

Dmitry Z. picture Dmitry Z. · Apr 22, 2011
$this->id