0
我如何设置路由如下Zend框架:需要帮助建立路由
与标准路由
/posts => index action (listing)
/posts/view => view action (individual post)
/posts/add => add action
/posts/edit => edit action
什么生根粉这些这些工作?
/posts
可以通过基于1个或多个查询字符串以任意顺序过滤。例如。
/posts/tagged/tag1 /posts/tagged/tag1/timeframe/1w => fyi。 1瓦特装置1周 /帖/时限/ 1W /加标签/标记1 =>可以是任何顺序 /帖/ sortby/dtposted =>更多的选项可以加入
我怎样才能处理这些?我试图
$route = new Zend_Controller_Router_Route(
'posts/*',
array(
'controller' => 'posts',
'action' => 'index'
)
);
$router->addRoute('postsIndex', $route);
但COS的,以posts/*
所有路由去索引控制器。不是我想要的