Hi,
I want navigation structure like this…
Hi,
I want navigation structure like this…
On May 19, 2008, at 1:12 PM, Remco S. wrote:
Someone good ideas or link, plugins, helpers to realize this in rails?
Well, first off, nested
I’d probably use an array of hashes:
products_menu = [
{:id=>’’, :title=>’’, :href=>’’, :text=>’’, :class => ‘li_indent1’ },
{:id=>’’, :title=>’’, :href=>’’, :text=>’’, :class => ‘li_indent1’ },
{:id=>’’, :title=>’’, :href=>’’, :text=>’’, :class => ‘li_indent2’ },
{:id=>’’, :title=>’’, :href=>’’, :text=>’’, :class => ‘li_indent2’ },
{:id=>’’, :title=>’’, :href=>’’, :text=>’’, :class => ‘li_indent1’ },
{:id=>’’, :title=>’’, :href=>’’, :text=>’’, :class => ‘li_indent1’ },
]
iterate that structure to create your
Google “son of suckerfish”
Greg W. wrote:
On May 19, 2008, at 1:12 PM, Remco S. wrote:
Someone good ideas or link, plugins, helpers to realize this in rails?
Well, first off, nested
is not valid XHTML, so you’re better off
using CSS class to differentiate the nested level of various
items. That will also simplify the Ruby code (no need to create
recursive functions).I’d probably use an array of hashes:
products_menu = [
{:id=>’’, :title=>’’, :href=>’’, :text=>’’, :class => ‘li_indent1’ },
{:id=>’’, :title=>’’, :href=>’’, :text=>’’, :class => ‘li_indent1’ },
{:id=>’’, :title=>’’, :href=>’’, :text=>’’, :class => ‘li_indent2’ },
{:id=>’’, :title=>’’, :href=>’’, :text=>’’, :class => ‘li_indent2’ },
{:id=>’’, :title=>’’, :href=>’’, :text=>’’, :class => ‘li_indent1’ },
{:id=>’’, :title=>’’, :href=>’’, :text=>’’, :class => ‘li_indent1’ },
]iterate that structure to create your
- lines, and use css to
create the indent pattern you need.<% products_menu.each do |nav_item| -%> '
- http://www.smartertravel.com/
remco
Greg W. wrote:
<li id="hardw" title="link to hardware"><a
href="#">Hardware
Someone good ideas or link, plugins, helpers to realize this in rails?
Well, first off, nested
is not valid XHTML
Yes it is. You’re just not allowed to nest a
is perfectly legal. I think it’s better too, because it reflects the
menu
logic, renders well without a stylesheet and allows for easy
collapsing/expanding of subtrees. You can still have a flat
representation
in the database, that’s a matter of taste.
On May 20, 2008, at 11:23 AM, Ix Quic wrote:
<li> ... </li> </ul>
is perfectly legal. I think it’s better too, because it reflects
the menu
logic, renders well without a stylesheet and allows for easy
collapsing/expanding of subtrees. You can still have a flat
representation
in the database, that’s a matter of taste.
Hmm, New to me. Never seen/tried
Well then, a recursive function it is…
– gw
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs