我有一个插件,并且在插件视图中添加了与用户模型(基本应用程序)的关系,我想根据用户id引用用户的详细信息,
我从plugin获取用户id,但url是pluginName/users/view/1
<?php echo $this->Html->link($event['User']['username'], array('controller' => 'users', 'action' => 'view', $event['User']['id'])); ?>
如何重定向到应用程序/用户/视图/1?
非常感谢
您可以设置插件=
<?php echo $this->Html->link($event['User']['username'], array('plugin' => false, 'controller' => 'users', 'action' => 'view', $event['User']['id'])); ?>
你必须使用“插件”=
<?php echo $this->Html->link($event['User']['username'], array('plugin'=>null,'controller' => 'users', 'action' => 'view', $event['User']['id'])); ?>