Need help with semantic-menu?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

danielharan
121 Stars 29 Forks MIT License 24 Commits 3 Opened issues

Description

A plugin to make rails menus easier to write

Services available

!
?

Need anything else?

Contributors list

= SemanticMenu

A plugin to make large menus easier to write.

Supports arbitrarily deep nesting; parents will be marked as 'active' if any of its children are active.

== Example

<%= semanticmenu do |root| root.add "overview", rootpath root.add "comments", comments_path end %>

Assuming you are on /comments, the output would be:

add and semantic_menu both take an optional parameter hash, and you can nest the menu as deeply as you want:

<%= semanticmenu :class => 'toplevelnav' do |root| root.add "overview", "rootpath" root.add "comments", "commentspath", :class => 'button' do |comments| comments.add "My Comments", "mycommentspath" comments.add "Recent", "recentcomments_path" end end %>

This would look like this:

Copyright (c) 2008 Daniel Haran, released under the MIT license

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.