$router->addRoute('routeName', new Zend_Controller_Router_Route(
'test/:category/', array(
'module' => 'default',
'controller' => 'test',
'action' => ':category'
)
));
这是我目前的代码(请参见上文)。我怎么能通过一个给定的param(通过URL)调用这个动作?该网址看起来像像这样:domain.com/test/news/
现在我想在测试控制器中调用newsAction()动作。使用上面的代码,我得到错误:Action "category" does not exist and was not trapped in __call()
Zend Framework - 路由:通过param调用动作