NDeveloper
NDeveloper

Reputation: 41

CakePHP Image Link

I can't find how a make this a link to my image in CakePHP:

  <img src="img/default.png" width="130" style="position: absolute; top: 0px; left: 0px; z-index: 3; opacity: 0; ">



$html->image('default.png').....????;

Many Thanks!

Upvotes: 0

Views: 8672

Answers (2)

Lalita
Lalita

Reputation: 21

echo $this->Html->image(BASE_URL."images/plus.jpg",array("alt" => 'add fields',"id"=>"add_more","height"=>40,"width"=>40));

Upvotes: 0

Dunhamzzz
Dunhamzzz

Reputation: 14798

You need to add the following to the options array:

'url' => array('controller' => '..' 'action' => '..')

i.e.

$this->Html->image('default.png', array('url' => ..));

There's more information in the documentation

Upvotes: 8

Related Questions