Yii2 Icons Extension Set of icon frameworks for easy use in Yii Framework 2.0
Posted 07 December 2013 - 12:12 PM
Posted 09 December 2013 - 11:03 PM
This is more a configuration at the Nav Widget level. Read the docs and code for Yii2 Bootstrap extension. The Yii2 Navbar uses Nav widget to generate menus. Note: The kartik\icons\Icon::show will generate HTML code. So in your Nav::widget you should use encodeLabels => false to not Html encode icons in labels. For example:
use kartik\icons\Icon; $items = [ ['label' => Icon::show('home') . 'Home', 'url' => ['/site/index']], ]; NavBar::begin(['brandLabel' => 'My Application']); /* Note you must encodeLabels to false to display icons in labels */ echo \yii\bootstrap\Nav::widget([ 'items' => $items, 'encodeLabels' => false ]); NavBar::end();
Posted 07 April 2014 - 11:16 AM
Posted 11 April 2014 - 07:23 AM
Not sure what you have missed. Cannot replicate at my end. I tested a fresh install of the basic app and then installed this extension and it works. After basic app install, I added kartik-v/yii2-icons: dev-master to the require section of composer.json, and ran composer update and the extension installs flawlessly. Can you check the composer settings, package cache, and see if something is amiss?
Posted 11 April 2014 - 07:56 AM
Edit -- Tried again and it worked! I don't know what happened before... Thanks!
No problems - it happens at times... . Nice to know you got it working.
Posted 27 April 2014 - 09:35 AM
- Krajee's Uni Icons - Unicode Symbols made available as CSS. Refer demo here
- Bootstrap Glyphicons added to the list of frameworks.
Check the updated extension demo.