tanvir tanvir - 4 months ago 8
PHP Question

How to use html edit character (✎) instead of directly use "edit" in cakephp?

i have this link

<?= $this->Html->link(__('Edit'), ['action' => 'edit', $o->id]) ?>.


Instead of Edit ,i want to use edit html character (✎).

please help.

Answer

Just add "escape" parameter and set it to false.

You may wanna refer to this: CakePHP 3 creating links

<?php 
     echo Html->link(__('&#x270E;'), 
         ['action' => 'edit', $o->id],
         ['escape' => false]
 ) ?>