Multi level menu, active links css highlight. (Ruby on Rails)
- by klamath
Site structure:
/
/products
/products/design
/products/photo
/about
I want to see parent menu item also highlighted by CSS, when child is active.
(When 'design' or 'photo' is active 'products' should be highlighted too.)
I'm using this for child and simple urls:
<li class="<%= current_page?(:action => 'design') %>">
<%=…