codeplant / simple-navigation

A ruby gem for creating navigations (with multiple levels) for your Rails, Sinatra or Padrino applications. Render your navigation as html list, link list or breadcrumbs.
http://simple-navigation-demo.codeplant.ch/
MIT License
885 stars 136 forks source link

Auto-generate IDs? #177

Closed jmuheim closed 9 years ago

jmuheim commented 9 years ago

I find it annoying that I have to specify an ID for each and every menu item manually, as I don't even need them most of the time.

Is there a way to dismiss them? When leaving the first parameter of #item nil, it still adds an id attribute, simply with no value.

simonc commented 9 years ago

Hi @jmuheim,

Actually it's not an id, it's an identifying key that may be used to generate ids. There is an option to disable the ids generation if you want to:

# Item keys are normally added to list items as id.
# This setting turns that off
# navigation.autogenerate_item_ids = false