Reputation: 13
I have a plugin, and add relationship with user Model(base application) In the plugin view, I want to reference user's details based on user_id,
I get the user_id from plugin, but the url is pluginName/users/view/1
<?php echo $this->Html->link($event['User']['username'], array('controller' => 'users', 'action' => 'view', $event['User']['id'])); ?>
How to redirect to the App/users/view/1 ?
Many thanks
Upvotes: 1
Views: 1524
Reputation: 2025
You have to use 'plugin'=>null
<?php echo $this->Html->link($event['User']['username'], array('plugin'=>null,'controller' => 'users', 'action' => 'view', $event['User']['id'])); ?>
Upvotes: 0
Reputation: 6767
You set plugin => false
in the url array for it to use the "base" app.
<?php echo $this->Html->link($event['User']['username'], array('plugin' => false, 'controller' => 'users', 'action' => 'view', $event['User']['id'])); ?>
Upvotes: 1