echo $html->link('Plugin Controller/Action Link', array('plugin' => 'plugin_name', 'controller' => 'controller_name', 'action' => 'action_name'));
The output will be:
http://example.com/plugin_name/controller_name/action_name
Make sure to mention 'plugin' => null in remaining urls, if you do not want to show plugin_name in other displayed links.
echo $html->link('Non Plugin Link', array('plugin' => null, 'controller' => 'controller_name', 'action' => 'action_name'));
Output:
http://example.com/controller_name/action_name
If you do not specify 'plugin' => null, all the displayed links will show:
http://example.com/plugin_name/controller_name_1/action_name_1
http://example.com/plugin_name/controller_name_2/action_name_2
http://example.com/plugin_name/controller_name_3/action_name_3
From this what I get is that it is better to specify 'plugin' => null in case of all non-plugin links which are likely to be displayed in tandem with plugin links.
Or, there may be a short route - who knows?
Cake rocks... still learning each day...
1 comment:
awesome thanks buddy!
Post a Comment