Hi all

I have the following route defined in my bootstrap:

$applicationRoute = new
Zend_Controller_Router_Route('applicationID/:id/file/:fileType',
                                                                        
array('controller' => 'application',
                                                                        
'action' => array('view')),
                                                                        
array('applicationID' => '\d+',                                                 
                                                                                
   'file'=> '\w+')                                                              
                                                
);              
router->addRoute('application', $applicationRoute);


...and in my view script am attempting to create the url for the route as
follows:

"<?php echo $this- url(array('controller' => 'application', 'action' =>
'view', 'applicationID' => $application->getId(),  'file' => 'cv'),
'application', true); ?>">View Application 

...which throws an exception, with the message "id is not specified".
If i change the second parameter from the named route ('application') to
'default' the page loads fine, except i don't think the parameters are being
checked against the route.

What is causing the exception to be thrown?


ps. the behaviour of the third parameter is a bit strange - why should you
need to manually set each link to not inherit the previous routes
parameters?

-- 
View this message in context: 
http://n4.nabble.com/Using-url-view-helper-with-named-custom-route-exception-id-not-specified-tp1678215p1678215.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to