Yii 1.1: emenu

css dropdown menu

it's a simple wrapper for css drop down menu framework from lwis.net


tested on Yii 1.1.8, may work on other versions


This extension class extends CMenu, and usage is just like CMenu. no need to code sample, right? :)

Consider this options when using EMenu:

  • $vertical: to make menu vertical

  • $rtl: to make vertical menu right to left

  • $upward: to make menu dropdown upward (dropup ?!!!)

  • $themeCssFile: to use a custom theme file

  • $theme: to use a provided theme

provided themes are : adobe, flikr, lwis, mtv, nvidia, vimeo and default.

Special note about IE 7 and before

IE 7 and before need a piece of provided javascript named jquery.dropdown.js to work. I dont know how to use client script to generate conditional parameters to include this js. for more information see here. if you have any suggestion, let me know via comment. for know, you can manually add this code to your layout head section:

<!--[if lte IE 7]>
<script type="text/javascript" src="js/jquery/jquery.js"></script>
<script type="text/javascript" src="path/to/published/jquery.dropdown.js"></script>


Total 10 comments

#19387 report it
Hipogea at 2015/06/13 08:57pm
Recursive render items

I've installed the extension on my application, however doesn't render children items. How do I get it?. How does apply the funcion renderMenuRecursive() ?. Is it necessary?

#9216 report it
Vainglory07 at 2012/07/29 06:47pm

hello everyone..im new to yii..i dont know how to configure things out..i just want to display the contents upward not vertical but how can i do it..please somebody help me..

so excited with this extension:)

#6496 report it
maxlight at 2012/01/14 09:13am

this is just what I wanted, thanks alot for sharing this!

#5960 report it
Wiseon3 at 2011/11/30 08:26am
Submenu Bug Fix

To correctly display sub-submenus edit EMenu.php and in function renderMenuRecursive() replace:

if(isset($item['items']) && count($item['items']))
                    $options['class']=' '.$this->dirCssClass;
                    $options['class'].=' '.$this->dirCssClass;
            echo CHtml::openTag('li', $options);


if(isset($item['items']) && count($item['items']))
                    $options['class'].=' '.$this->dirCssClass;
            $item['linkOptions'] = array_merge((array)$item['linkOptions'], $options);
            echo CHtml::openTag('li');
#5302 report it
shizo971 at 2011/10/03 12:29am
others themes problems.

Other themes don't work for me, how can i solve them plz ?

great extension

#5133 report it
thyseus at 2011/09/18 02:25am
Nice extension

Works very fine and makes my CDropDownMenu totally obsolete. I prefer this one over my own widget. Keep up the good work ;)

#5117 report it
makro at 2011/09/15 09:16am
great but..

Thank you for extension. It works fine with default theme. Other themes are not supported well and default.advanced.css and default.ultimate.css are not working fine too. This 'cos "dir" class for elements in CMenu is set in [li] tag but some themes need it in [a] tag... others in [span] tag... and so on...

Could you check it please?

#5110 report it
Mas Gagah at 2011/09/15 02:02am
Cute component

So cute... tenkyu so much

#5051 report it
Raoul at 2011/09/10 07:22am
just what I needed !!

great extension !! Thanks Arash.

Just in case ... I've modified the way themeCssFile is handled so a custom menu theme could be located anywhere and not only in the extension folder.

EMenu.php - line 79


So I can set the css theme in my current theme folder.

        'themeCssFile' => Yii::app()->theme->baseUrl.'/css/menu.default.css',
....etc ....

Good Job

#5042 report it
yiqing95 at 2011/09/09 05:36am

beautiful , looks cool . thanks for bringing us such a wonderful menu implement .

Leave a comment

Please to leave your comment.

Create extension