Forum: Ruby on Rails Two level Navigational menus

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
D3fc5887a2f39f2e0c8989d39ce5e6f9?d=identicon&s=25 Bharat Ruparel (bruparel)
on 2009-03-28 23:32
This has turned out to be a bit more difficult than I anticipated.  I
thought that creating two levels of generic navigational menus should
not be that difficult.  May be I am missing something.  I have done it
by borrowing code from various sources and modifying it.  Still, the
code is not clean and I don't like what I have.  The complication comes
from keeping the parent tabs selected when the child tabs are clicked on
and then links, e.g., show, edit, destroy are clicked on the forms that
are displayed.  Another complication comes from having first level menu
forms that have links that use display forms from other menu choices.

I did a lot of research on github for available sources/plugins and
found a few but either they are single level menus which do not maintain
the parent/child relationships between two level menus or if they do,
make it a rocket science (at least for me).  I am looking for something
simple like Tim Harper's role_requirements plugin which is very easy to
understand, does the job, and is a joy to read his code and learn from
it.

I have looked at the following on github:

Navigation Helper - Of all, I like the API and code the best for this
plugin, but it does not have support of nested menus:  Here is the link
on github:

http://github.com/rpheath/navigation_helper/tree/master

Symantic-Menu - This has everything I need, but unfortunately does not
work.  I sent a query to the author who has not responded.  Here is the
link on github:

http://github.com/danielharan/semantic-menu/tree/master

Easy Navigation - Again meets the requirements, but I found it hard to
understand.  The author does not have tests for this plugin.  Here is
the link on github:

http://github.com/innetra/easy_navigation/tree/master

Rails Widgets - this is a rather comprehensive set of UI components one
of which is TabNav.  I did something similar for my implementation which
has not turned out to be clean as I mention above.  Therefore I am
reluctant to dive into it and invest a lot of time in it.  Here is the
link on github:

http://wiki.github.com/paolodona/rails-widgets/tabnav

I would appreciate it if someone can point me to a rather simple and
clean implementation of tabbed menu navigation.  For my requirements, a
two level deep menus would suffice.  It should have the flexibility to
specify the current tab to be hi-lighted and specifying the classes for
the CSS styling.  Also, if someone has successfully used one of the
aforementioned plugins and can share sample code that would be nice too.

Sorry for the long post and thanks for your time.

Bharat
3ff9c2544554b13c6c7877e76684751b?d=identicon&s=25 Lee Smith (smitjel)
on 2009-03-30 20:04
(Received via mailing list)
Why are you expecting a rails plugin to provide an xhtml navigation
menu?  Why not just implement the drop down menu using simply xhtml
(lists) and css?

Try this:
http://www.lwis.net/free-css-drop-down-menu/

Specifically:
http://www.lwis.net/free-css-drop-down-menu/dropdo...

If you want to get fancy (and you use jQuery), try this:
http://users.tpg.com.au/j_birch/plugins/superfish/

Specifically:
http://users.tpg.com.au/j_birch/plugins/superfish/#sample4

HTH.


On Mar 28, 5:32 pm, Bharat Ruparel <rails-mailing-l...@andreas-s.net>
D3fc5887a2f39f2e0c8989d39ce5e6f9?d=identicon&s=25 Bharat Ruparel (bruparel)
on 2009-05-12 17:10
(Received via mailing list)
I am using jQuery now and am interested in using Superfish.  Can you
point me to a working example of Superfish and RoR integration?
Thanks.
Bharat
This topic is locked and can not be replied to.