Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CakePHP HTML link

I am trying to use CakePHP HTML Linker for the following code

<li class="iAdd"><a href="add"><span>Add Cuisine</span></a></li>

Since the span tag needs to be inside the a tag. am not able to get the output as need. Any suggestions on how to get it done ?

like image 866
Harsha M V Avatar asked Dec 21 '11 10:12

Harsha M V


1 Answers

Disable the escape option in your link code, like so:

<li class="iAdd">
<?php echo $this->Html->link(
    '<span>Add Cuisine</span>',
    array('action' => 'add'),
    array('escape' => false) // This line will parse rather then output HTML
); ?>
</li>
like image 101
Oldskool Avatar answered Sep 18 '22 14:09

Oldskool