How to create a link within a plug-in

Published on and tagged with cakephp  tip

Just a short tip: If you want to create a link in a plug-in to a location within the (same) plug-in you have to do it in the following way:
$html->link('link', $this->controller->base.'/mycontroller/myaction');
That will create this html snippet:
<a href="/myplugin/mycontroller/myaction">link</a>

2 comments baked

© daniel hofstetter. Licensed under a Creative Commons License