middleman-navigation icon indicating copy to clipboard operation
middleman-navigation copied to clipboard

Custom classes or ids for navigation items?

Open cpolzer opened this issue 10 years ago • 3 comments

Hi!

Is it possible to setup custom classes and/or ids for the genreated list items?

I found this with simple.navigation: https://github.com/codeplant/simple-navigation/wiki/FAQ#q4

cpolzer avatar Jul 14 '14 14:07 cpolzer

That's not currently possible, but it wouldn't be hard to add. This line https://github.com/michaek/middleman-navigation/blob/master/lib/middleman-navigation/tree.rb#L46 is where we're calling .item as in the simple-navigation example, and I'd suggest we'd allow class and id as keys of the navigation configuration in the YAML frontmatter, and that class or id would be applied to the navigation item. Does that sound like it would achieve what you're looking for?

michaek avatar Jul 15 '14 11:07 michaek

let me try this (end next week)

cpolzer avatar Jul 15 '14 12:07 cpolzer

Awesome - let me know if you need any help. I can probably get to it too - I'll post an update here if I have a chance.

michaek avatar Jul 15 '14 13:07 michaek