0
我正在抓住蛋糕的路由,但在差异显示一个表中的数据时遇到问题。观点。CakePHP路由和按ID显示数据
我有一个由news_type_id标记的文章的新闻表。 我有每个路由设置为显示视图调用requestAction并按特定的news_type id列出新闻文章。
//--index of news articles with news_type_id = 1
/section1/
//--index of news articles with news_type_id = 2 etc
/section2/
我的路线是建立这样的:
Router::connect('/section1', array('controller' => 'pages', 'action' => 'display', 'section1'));
但问题很快是因为我尝试:
Router::connect('/section1', array('controller' => 'pages', 'action' => 'display', 'section1'));
Router::connect('/section2', array('controller' => 'pages', 'action' => 'display', 'section2'));
...当然的行动路线回到顶端路线(SECTION1)。
有人能指出我对此明显吗?