Easiest way to do this is by extending the Zend_Controller_Action_Helper_Url
class, and adding the query string to the parent::url()
result. Than, you need to inject your url helper into the mvc page, by calling Zend_Navigation_Page_Mvc::setUrlHelper($yourUrlHelper)
.
Example of a query string supported url helper:
class My_Helper_Url extends Zend_Controller_Action_Helper_Url
{
public function url($urlOptions = array(), $name = null, $reset = false, $encode = true)
{
$queryString = $this->getRequest()->getServer('QUERY_STRING');
return parent::url($urlOptions, $name, $reset, $encode) .
($queryString ? '?' . $queryString : '');
}
}