At the moment in my ZF project have a URL structure like this:
/news/index/news_page/1/blog_page/2
When I generate my pagination I use the URL helper as follows:
<?php echo $this->url(array('blog_page'=>3)); ?>
Which generates a URL like this:
/news/index/news_page/1/blog_page/3
What I'd like to do is use a custom route to have nicer URLs, something like this:
new Zend_Controller_Router_Route(
'news/:news_page/:blog_page',
array('controller' => 'news', 'action' => 'index')
);
However, when I try an use this route in the view helper:
<?php echo $this->url(array('blog_page'=>3), 'newsIndex'); ?>
It throws an error because I've not specified news_page in the params.
How can I get around this, and tell the url helper to use the 'current' values for these params?