Maybe I'm goofy and can't find the documentation. I want to add a fragment id to the end of the URL used in a controller action redirection. This is kind of what I want to do:
return $this->redirect()->toRoute('jobapplication',array('action'=>'edit','id'=>$candidateclass->application_id,'fragment'=>'candidateclass'));
All I get is this:
http://localhost/Zend/public/jobapplication/edit/21
And I want this:
http://localhost/Zend/public/jobapplication/edit/21#candidateclass
Thoughts?
You pass the fragment in the $options
array, which is the third parameter of the toRoute()
method, try...
return $this->redirect()->toRoute(
'jobapplication',
array('action' => 'edit', 'id' => $candidateclass->application_id),
array('fragment' => 'candidateclass')
);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With