views:

15

answers:

1

I have a problem with the routing while using the Searchable Plugin of Neil Crookes. When I search for something the URL looks like this: http://localhost/search/All/sunshine

But now all the other links have the name of the plugin in their URL. For example this: $html->link(__('News', true), array('controller'=>'news', 'action'=>'index')); creates this link url: http://localhost/searchable/news correct would be http://localhost/news

I already have this in app/config/routes.php:

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

Any idea how I can get rid of "/searchable/" for my normal app links???

+1  A: 

For your normal links created by the Cake link helper you have to add this parameter 'plugin' => null

Example:

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