3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/generators/templates/helpers/mmmenu_helper.rb', line 3
def (, options = {})
return nil unless
options = {templates_path: 'mmmenu' }.merge(options)
templates_path = options[:templates_path]
.item_markup(1) do |link, text, options|
render(:partial => "#{templates_path}/item", :locals => { :link => link, :text => text, :options => options })
end
.current_item_markup(1) do |link, text, options|
render(:partial => "#{templates_path}/current_item", :locals => { :link => link, :text => text, :options => options })
end
.level_markup(1) { |m| render(:partial => "#{templates_path}/level_1", :locals => { :menu => m }) }
.level_markup(2) { |m| render(:partial => "#{templates_path}/level_2", :locals => { :menu => m }) }
.build.html_safe
end
|