laktek / simple-menu
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
| name | age | message | |
|---|---|---|---|
| |
README.markdown | Wed Mar 25 07:15:20 -0700 2009 | |
| |
init.rb | Tue Mar 24 09:17:10 -0700 2009 | |
| |
lib/ | Thu Jul 02 03:51:08 -0700 2009 | |
| |
spec/ | Tue Mar 24 09:17:10 -0700 2009 |
README.markdown
Simple Menu Plugin for Rails
This is still under active development. Feel free to fork and hack.
Features
- Possible to have muliple menus in same page
- Current Tab selection (set the @current_tab with the tab(s) you want to select for current controller/action.)
- Automatic URL derivation.
- Customize the URL, link text (supports html tags)
- Supports html options. Specify custom ids and classes
- Provide a custom seperator
Some example cases
menu_tag :main-menu, :seperator => "|" do |menu| if current_user menu.item :settings, :url => account_path menu.item :help, :url => "#" menu.item :sign_out else menu.item :signup, :text => "Create an account", :url => new_user_path menu.item :sign_in, :url => new_user_session_path end endmenu_tag :manage, :class => "sidemenu" do |menu| menu.item :clients, :text => "<strong>Clients</strong><br/>Your contacts & address book" menu.item :items, :text => "<strong>Items</strong><br/>Tasks, products and services" end
