2010-07-18 56 views
0

我在使用Neil Crookes的Searchable Plugin時遇到了路由問題。當我搜索的東西的URL看起來像這樣: http://localhost/search/All/sunshineCakePHP Neil Crookes的可搜索插件

但現在所有其他鏈接的名稱在他們的網址插件。 例如: $ html-> link(__('News',true),array('controller'=>'news','action'=>'index')); 創建此鏈接網址:http://localhost/searchable/news正確會http://localhost/news

我已經在應用程序有這種/配置/ routes.php文件:

Router::connect('/search/:type/:term/*', array(
    'plugin' => 'searchable', 
    'controller' => 'search_indexes', 
    'action' => 'index', 
)); 

任何想法我如何能擺脫「/搜索/「爲我的正常應用程序鏈接?

+0

我拍尼爾一封電子郵件,我敢肯定你會在某個時候得到答覆! :) – 2010-07-19 13:37:16

回答

1

對於由蛋糕鏈接幫助創建了正常的鏈接,您必須添加此參數「插件」 =>空

例子:

$html->link(__('News', true), array('controller'=>'news', 'action'=>'index', 'plugin' => null));