-- monk.e.boy <[EMAIL PROTECTED]> wrote
(on Tuesday, 08 July 2008, 07:36 AM -0700):
> Matthew Weier O'Phinney-3 wrote:
> > 
> > 
> > Use the redirector instead of constructing the URL yourself:
> > 
> >     $this->_helper->redirector('project');
> > 
> > This will do the same as what you were trying to accomplish before.
> > -- 
> > Matthew Weier O'Phinney
> > 
> > 
> 
> Matt,
> 
>   Thanks for the promp reply!
> 
>   Does the redirector act like the URL constructor? My URL looks like this:
> 
>   /base/application/report/customer/33/project/12/report/99/
> 
> Doing this:
>   $this->_helper->redirector('report')
> 
> takes me to:
>   /base/application/report/
> 
> How do you suggest I build and pass the URL above to the redirector? 

If you want to do url()-like redirection, use the gotoRoute() method
of the redirector:

    $this->_helper->redirector->gotoRoute(array('action' => 'project'));

It takes the same arguments as the url() view helper, and builds using
the same mechanisms.

> At the
> moment I do a lot of: 
> 
> '/base/application/report/customer/'. $this->_getParam( 'customer' ) .'/'.
> $this->_getParam( 'project' ) .'/report/'. $this->_getParam( 'report' )
> 
> which makes me feel icky :-(

-- 
Matthew Weier O'Phinney
Software Architect       | [EMAIL PROTECTED]
Zend Framework           | http://framework.zend.com/

Reply via email to