CakePHP - how to use $ html-> link inside element

How can I use the $ html-> link inside an element?

Thanks
Tee

+2


source to share


1 answer


In both versions 1.2 and 1.3 this should work:

echo $html->link('linkname',array('controller'=>'somecontroller','action'=>'someaction/somearguments'));

      

Update



The html helper has changed slightly in version 2.x. Example from a cookbook

echo $this->Html->link('Enter', '/pages/home', array('class' => 'button', 'target' => '_blank'));

      

+3


source







All Articles