ynroot
ynroot

Reputation: 79

Customize $this->Html->link() As per HTML

i have this html code, and am having problem to create link on cakephp !

this is the html code!

 <li>
       <a href="#">
        <i class="fa fa-angle-double-right"></i> 
        Morris
      </a>

    </li>

And i want to make it like this, cakephp way!

<li>
<?php echo $this->Html->link(__('list'),
              array(
                'controller'=>'transactions',
                'action'=>'index'
              )

           ); ?>
</li>

but am having problem with this, where and how i will put this:

i want it to be like this

https://drive.google.com/file/d/0Bw9K-whE0SuvQkhUQy14T2lacjQ/view?usp=sharing

Upvotes: 1

Views: 113

Answers (1)

Pratik Joshi
Pratik Joshi

Reputation: 11693

Use

echo $this->Html->link(
   '<i class="fa fa-angle-double-right"></i>',
    array(
      'controller'=>'transactions',
      'action'=>'index'
    ),
    array(
      'escape'=>false  //NOTICE THIS LINE ***************
    )
);

Upvotes: 2

Related Questions