2012-08-12 37 views
1

我有一个插件,并添加与用户模型(基本应用程序)的关系 在插件的看法,我想根据USER_ID引用用户的详细信息,如何从插件控制器调用CakePHP基础应用程序?

我从插件user_ID的,但是URL是pluginName /用户/查看/ 1

<?php echo $this->Html->link($event['User']['username'], array('controller' => 'users', 'action' => 'view', $event['User']['id'])); ?> 

如何重定向到App/users/view/1?

非常感谢

回答

1

你的URL数组中设置plugin => false它使用了“基地”的应用程序。

<?php echo $this->Html->link($event['User']['username'], array('plugin' => false, 'controller' => 'users', 'action' => 'view', $event['User']['id'])); ?> 
+0

感谢您的快速反应 – user1477673 2012-08-12 06:08:53

0

你必须使用'plugin'=>null

<?php echo $this->Html->link($event['User']['username'], array('plugin'=>null,'controller' => 'users', 'action' => 'view', $event['User']['id'])); ?> 
相关问题