Reputation: 328
New to cakephp, I'm trying to make an icon that is link to an external site, I tried to surf the cookbook and some forums but I seem to can't find what I'm looking for.
Here's my current code:
echo $this->Html->link($this->Html->image('ex_vi.png', array('height' => '40', 'width' => '40')) . '' . ('Example'), array('http://examples.com'), array('escape' => false));
Any help is appreciated, a little bit frustrated first time to code with a framework, everything is quite different
Upvotes: 0
Views: 1092
Reputation: 460
You can use following code to add external link to image
echo $this->Html->link($this->Html->image('ex_vi.png', array('height' => '40', 'width' => '40')) . '' . ('Example'), 'http://examples.com', array('escape' => false));
Just Pass URL directly without array
Upvotes: 4