Reputation: 54949
I am trying to replicate the following code using HTML Helper in CakePHP 2.1. Not sure how to include the Span tag into the tag.
<div class="backTo">
<a href="#" title="">
<img src="images/icons/topnav/mainWebsite.png" alt="" />
<span>Main website</span>
</a>
</div>
What i have tried
<?php echo $this->Html->image("icons/topnav/mainWebsite.png", array("alt" => "Back", 'url' => array('controller' => 'pages', 'action' => 'display', 'home')); ?>
Upvotes: 0
Views: 702
Reputation: 522081
echo $this->Html->link(
$this->Html->image('...', array(...)) . '<span>Main website</span>',
array('controller' => ...),
array('escape' => false)
);
Upvotes: 2