Question

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

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top