codeplant/simple-navigation

Passing a block with HTML to an item

jmuheim opened this issue · 3 comments

I want to have a megadropdown in one of my navigations like this:

image

I'm unsure about how to place the megadropdown code in the view, though. I tried it like this:

- navigation.item :navigation_sign_in, t('.sign_in') do |sub_navigation|
  - sub_navigation.item :navigation_sign_in_panel do
    .yamm-content
      .row = render 'devise/sessions/form', resource: User.new, display: :small

This results in the following error:

wrong number of arguments (1 for 2..4)

Is there a way to give a block with HTML to the item so it is rendered as item content?

andi commented

@jmuheim simple-navigation currently does not support mixing navigation configuration DSL and HTML/haml code

This is very sad and the main reason I switched to https://github.com/jejacks0n/navigasmic.

andi commented

I'm happy to hear that you found another solution that suits your needs