Extension have a small size (near 18kb) but depends on jQuery.
Yii 1.1.x or above
Crete menu items array
$items = array( array( 'name' => 'Google corp', 'link' => 'http://google.com', 'icon' => 'google', 'active' => 'dashboard', 'sub' => array( array( 'name' => 'Gmail', 'link' => 'http://gmail.com', ), array( 'name' => 'Gmap', 'link' => 'http://maps.google.com/', ) ) ) );
Use menu widget:
$this->widget('ext.menu.EMenu', array('items' => $items));
Total 13 comments
Is there any parameter to change custom icon from a link?
Thanks,
Can you provide more information about this behavior?
Hi.
Nice extension I have to say. Congrats.
What I want to know is how to keep the parent item of a clicked subitem expanded.
Any idea?
Extension support module check, so you can use
And everything will be fine
for thoes who had a problem when adding this extension, you may edit the "EMenu.php" by adding
<?phpon the top.
Fatal error: Class 'EMenu' not found in C:\xampp\htdocs\yii\framework\web\CWidgetFactory.php on line 147
Is there a way you could make it so active = any of the URLs that are in the top and sub menus? That way your sub menu items could be anything and not stuck to the one controller if you want it to be active.
I kinda get what your saying but I'm still not understanding completly.
I couldn't get your method to work at all. This module uses so many different controllers and I don't know a way to get it to work for say /user/profilefield or /user/profilefield/create.
What would I put in the active class for this to register? If I put user in the active class it will expand if you go to mydomain.com/user/user however, not on anything other than that.
here is what I'm using.
To skworden at 2013/01/11 12:45pm (#11409) As I know yii-user is extension. I Also use own user extension in my app, so I write :
where - user: extesion name - module: controller name - index: action name
Hello,
How would you modify the menu to open up when hovered instead of clicked ?
Thanks, Jonathan
Edit: just isn't working with yii-user
Active doesn't work if it's a module's controller.
i.e. I'm using user module so the url is mydomain/user. I put user in the active class like this:
and it doesn't register it as being active when on mydomain/user.
I don't know if there is a better way to do this but this is what i did to have 2nd level icons.
in emenu.php:
After
Add
You can call it just like you do on level one with 'icon'=>'icon',.
You gave me idea, I'll think about it on weekend
Seems well behaved.
Have you done any integration with mysql db? I think it would be easy to format the structure, just curious if you had done so and had any advice or suggestions on what to do/avoid.
Thanks!
Leave a comment
Please login to leave your comment.