Displaying 3 results from an estimated 3 matches for "navigation_bar".
2006 Jan 04
2
Navigation Helper
I am attempting to integrate a main navigation section into my web
application. Naturally the easiest and DRY way to do this would be to
either include it in a layout, or as a partial. The only problem is
that I want the link for the current page to have its own css id
("current"). The only way I can think to accomplish this is to just
include the navigation in every page, but this is
2006 Feb 27
0
application helper and tri-state images
...I would love to know
the ''rails'' way of doing this or even just a suggestion. Here''s my
helper.
module ApplicationHelper
# we use this function to create the tri-state image with rollovers
# todo I need to use a good css trick for this and not this function
def navigation_bar
links = [ ''home|/store/home'',
''about|/store/about'',
''necklaces|/store/browse/necklaces'',
''bracelets|/store/browse/bracelets'',
''earrings|/store/browse/earrings...
2006 Jan 02
3
best to integrate dynamic navbar into layout
...each link has 3 images.
Normal, rollover, and dark for the current page. I have it working but
it seems like there should be a better way. Here is how I did it,
please let me know if there is a better way. Rails makes so many things
simple, that this seems very awkward.
In my layout:
<%= navigation_bar %>
In my application_helper.rb
if @current_page == :home
@home_link = ''<td width="80" class="button_background"><a
href="/store/home"><img name="home" border="0"
src="/images/home_dark.gif" alt="...