Closed jmuheim closed 9 years ago
So I managed to set the renderer for all generated menus like so in config/navigation.rb
:
navigation.renderer = SimpleNavigation::Renderer::Bootstrap
Hi @jmuheim,
You can set the dom_class
and dom_id
options in the config file but the expand_all
is specific to the renderer. One solution could be to create a renderer that inherits from SimpleNavigation::Renderer::Bootstrap
and defaults the expand_all
option to true
@jmuheim Not sure what exactly you are trying to achieve, but maybe you the option to render different contexts with different config files would help? See https://github.com/codeplant/simple-navigation/wiki/FAQ#user-content-wiki-q10
I have the following menu:
My
config/navigation.rb
file looks like this:I'd like to move all the settings to the config file, as I want to generate many menus with exactly the same options, but different items. So I want to move the following stuff to the config file:
expand_all: true
renderer: :bootstrap
navigation.dom_class = 'nav'
navigation.dom_id = 'jump_links'
Is this possible? I couldn't manage to do it.