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

Add attributes to generated link in ad-hoc lists doesn't work for me #137

Closed jmuheim closed 10 years ago

jmuheim commented 11 years ago

In this article you explain how to add attributes to the generated link. This doesn't work for me in ad-hoc lists:

        { key: "new_activity_from_activity_type_#{activity_type.id}",
          name: activity_type.name,
          url: yield(activity_type),
          options: {class: "icons-#{activity_type.icon}"},
          link: {title: I18n.t('actions.create_resource', resource: activity_type.name)}, # Doesn't work
        }

Any idea what's wrong?

andi commented 10 years ago

Are you using the list renderer or some other renderer?

simonc commented 10 years ago

With the List renderer it's working as expected.

@jmuheim what renderer are you using ? Can you show how you define your navigation and how you call render_navigation ? :)

jmuheim commented 10 years ago

I completely forgot about this, I'm sorry. It's not relevant anymore.

simonc commented 10 years ago

Good to know. Thank you :)