Fatemeh Namkhah
Fatemeh Namkhah

Reputation: 711

add code into icon Yii

I have font icons and it work with class name and code, like this:

<i class="meh-icon icon-kids">&#xe87a;</i>

this is my code:

$items[1][] = array(
   'label' => $cat->name,
   'icon' => "meh-icon icon-" . $cat->icon . " icon-cat",
   'url' => aUrl('/discover/', array('section' => 'category', 'action' => $cat->url))
);

but it shows:

<i class="meh-icon icon-kids"></i>

I want add code into icon.

please help me. thank you.

Upvotes: 2

Views: 46

Answers (1)

Mohsen Zia
Mohsen Zia

Reputation: 444

Just add 'encodeLabel' => false to your items array

Upvotes: 3

Related Questions