Yii Framework Forum: Yii2 Icons Extension - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Yii2 Icons Extension Set of icon frameworks for easy use in Yii Framework 2.0 Rate Topic: ***** 1 Votes

#1 User is offline   Kartik V 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 629
  • Joined: 29-August 12

Posted 07 December 2013 - 12:12 PM

This is a discussion forum for the yii2-icons extension. This extension offers an easy method to setup various icon frameworks to work with Yii Framework 2.0. Most popular and free icon frameworks available are currently supported. You can view demo and documentation of this extension here.
0

#2 User is offline   Kartik V 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 629
  • Joined: 29-August 12

Posted 09 December 2013 - 11:03 PM

View Postbelmanski, on 09 December 2013 - 04:49 PM, said:

Can you tell me how I can show an Icon in the navbar in front of the text?

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();

0

#3 User is offline   belmanski 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 13
  • Joined: 13-February 12

Posted 10 December 2013 - 12:42 PM

Thnx, works great. Also thank you for sharing the Yii2 tools, great!
0

#4 User is offline   JFReyes 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 508
  • Joined: 28-October 09
  • Location:Puerto Rico

Posted 07 April 2014 - 11:16 AM

I'm getting started with Yii2 and cannot install your extension through Composer. It complains that the extension requires yiisoft/yii2:"dev-master" which isn't found. I installed the Yii2 basic application with no problems and it uses yiisoft/yii2:"*", not dev-master. Please let me know how to proceed.

Thanks,
José
0

#5 User is offline   Kartik V 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 629
  • Joined: 29-August 12

Posted 11 April 2014 - 07:23 AM

View PostJFReyes, on 07 April 2014 - 11:16 AM, said:

I'm getting started with Yii2 and cannot install your extension through Composer. It complains that the extension requires yiisoft/yii2:"dev-master" which isn't found. I installed the Yii2 basic application with no problems and it uses yiisoft/yii2:"*", not dev-master. Please let me know how to proceed.

Thanks,

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?
0

#6 User is offline   JFReyes 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 508
  • Joined: 28-October 09
  • Location:Puerto Rico

Posted 11 April 2014 - 07:33 AM

Thanks for the prompt answer; I'll try again and report back the results.

Edit -- Tried again and it worked! I don't know what happened before... Thanks!

This post has been edited by JFReyes: 11 April 2014 - 07:52 AM

José
0

#7 User is offline   Kartik V 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 629
  • Joined: 29-August 12

Posted 11 April 2014 - 07:56 AM

View PostJFReyes, on 11 April 2014 - 07:33 AM, said:

Thanks for the prompt answer; I'll try again and report back the results.
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.
0

#8 User is offline   Kartik V 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 629
  • Joined: 29-August 12

Posted 27 April 2014 - 09:35 AM

Extension upgraded to include 2 new frameworks:

  • 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.
0

#9 User is offline   langy 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 25
  • Joined: 27-November 13

Posted 04 May 2014 - 01:54 AM

Thanks this was really useful for my app.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users