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+)
Requirements ¶
Yii 1.1
Usage ¶
Copy the folder 'cssmenu' to the 'extenstions' folder in your Yii Installation
<? $this->widget('ext.cssmenu.CssMenu',array(
'items'=>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),
),
)); ?>
Repository ¶
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.
https://github.com/mrkmg/yii-ext-cssmenu
Installation...
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'.
CSS detailes
Thank you for extension, Is there any detailes about the CSS file? exactly for i18n.
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/
RE: External Links?
External links should work in the just uploaded version.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.