2013-10-30 212 views
0

如果我有一個CMS,並創建一個名爲「名稱」的頁面,但我也有一個名爲「名稱」控制器動態VS具有相同名稱的控制器

有沒有一種方法,我可以把它所謂的頁面「名」不覆蓋控制器

我曾嘗試以下途徑,但它似乎CMS DB頁「名」還是覆蓋

路線:

$route['name'] = "name"; 
$route['name/details/(:num)/(:num)'] = "screenings/details/$1/$2"; 

回答

0

你只需要添加:

$route['name'] = "name"; 

後:

$route['name/details/(:num)/(:num)'] = "screenings/details/$1/$2"; 

所以你的情況將是:

$route['name/details/(:num)/(:num)'] = "screenings/details/$1/$2"; 
$route['name'] = "name/index"; //It is better to add the /index just to make sure 

至於我記得在笨路線優先級是您首先添加的內容。

相關問題