2
我在app/plugins中添加了CakeDC-Users插件。添加插件后cakephp路由问题
现在为http://example.com/,如果我点击home/index链接,它会错误地重定向到http://example.com/users/posts/index,但它应该是http://example.com/posts/index。
为什么插件'用户'总是添加在各自的控制器之前?
如果我删除CakeDC,用户可以从应用/插件插件,并删除该行CakePlugin::loadAll();
从bootstrap.php中,然后我得到正常的链接/路由
routes.php文件:
Router::connect('/', array('controller' => 'posts', 'action' => 'index'));
如何我可以修复这个问题插件CakeDC - 用户插件
我一定要明确写入“插件”中的每一个环节=>假?我有这个在routes.php中,'Router :: connect('/',array('controller'=>'posts','action'=>'index'));' – shibly 2012-03-26 03:47:00
@prime yes,定义路由,你必须明确地定义plugin => false。如果你在你的插件之外,那将是好的,但是一旦你在插件内部导航,那么这些链接就会出错。 – 2012-03-26 05:00:21
有没有办法避免为所有链接手动添加'plugin'=> false? – shibly 2012-03-26 05:59:03