Module: Navigation

Defined in:
lib/generators/emenu/templates/default_menu/navigation.rb

Instance Method Summary collapse

Instance Method Details

menu method is uses as a hook to provide menu to render



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/generators/emenu/templates/default_menu/navigation.rb', line 5

def menu
  MenuConfig.define do |menu|
    #first menu group named Transportation
    menu.item :transportation do
      item :cars
      item :trains do
        item :fast_trains 
        item :slow_trains
      end
      item :planes do
        item :boeing do
          item :boeing747 do
            item :older_ready_to_crash
            item :brand_new
          end
          item :boeing474
        end
        item :airbus
      end
    end
    #second menu group named Orders
    menu.item :orders do
      item :bread
      item :butter
      item :chunky_bacon
    end
  end
end