Yii 1.1: cssmenu

A CSS only menu which behaves like CMenu or MbMenu compatible with iOS

A simple CSS menu generator which behaves like CMenu or MbMenu. No javascript is required and all the styles can be overridden.

  • Simple to use
  • CSS only
  • Requires minimal change in current menu code (assuming you are using CMenu or MbMenu)
  • Works on Chrome, Safari, Firefox, and IE (tested only newest versions as of Dec 1st 2011)
  • Works on iPad and iPhone (tested with iOS 4+)


Yii 1.1


Copy the folder 'cssmenu' to the 'extenstions' folder in your Yii Installation

<? $this->widget('ext.cssmenu.CssMenu',array(
        array('label'=>'Home', 'url'=>array('site/index')),
        array('label'=>'Products', 'url'=>array('product/index'), 'items'=>array(
            array('label'=>'New Arrivals', 'url'=>array('product/new')),
            array('label'=>'Most Popular', 'url'=>array('product/index')),
       array('label'=>'Login', 'url'=>array('site/login'), 'visible'=>Yii::app()->user->isGuest),
)); ?>


If you have any requests or you have made some improvements, I would love for you to let me know. I have created a repository on Github.




Total 4 comments

#15213 report it
mrkmg at 2013/10/18 10:02am
RE: External Links?

External links should work in the just uploaded version.

#15211 report it
smart at 2013/10/18 07:16am
External links?

Is there a way to implement external links? E.g. http://www.google.com/

With standard CMenu it is: ... array('label'=>'New Arrivals', 'url'=>'http://www.google.com/'), ...

but this doesn't work with cssmenu. The $url is always interpreted as array therefore the result is something like: ...index.php?r=http://www.google.com/

#13075 report it
Shahcheraghean at 2013/05/02 06:04am
CSS detailes

Thank you for extension, Is there any detailes about the CSS file? exactly for i18n.

#11413 report it
Luke Wenke at 2013/01/11 08:10pm

The instructions say "Copy the folder 'cssmenu' to the 'extenstions' folder in your Yii Installation"

Make sure you copy the child folder 'cssmenu' - not its parent folder 'CssMenu'.

Leave a comment

Please to leave your comment.

Create extension