0
我不知道如何实现它。Zend_Router_Regex和附加参数
我有这个路由器
$route = new Zend_Controller_Router_Route_Regex(
'category/([-\w]+)(?:/(\d+))?',
array('module' => 'dynamic', 'controller' => 'index', 'action' => 'show-category'),
array(1 => 'category', 2 => 'pageNumber'),
'category/%s/%d'
);
$router->addRoute('dynamic-categories', $route);
鉴于
组装网址是/类别/新闻/ 1使用$这个 - > URL(...)帮手。我希望我的第一页新闻将成为/分类/新闻。我应该使用其他路由来做它还是使用路由器链接。我很沮丧。谢谢你的帮助。
类别可能是新闻,文章,帖子等我应该为每个类别编写此路线规则吗? –
@vredniy:我已经更新了多个类别的代码。 – Fge