def item(title, url = '#', options = {})
      raise 'item third parameter expects a Hash' unless options.kind_of?(Hash)

      prev_item = menu_items.last

      if prev_item.parent == true # This came from root or dropdown
        lft = prev_item.lft + 1 # Go down. from lft
        rgt = prev_item.rgt + 1
      else
        lft = prev_item.rgt + 1 # Go accross, from rgt
        rgt = prev_item.rgt + 2
      end

      menu_items.each do |item|
        item.rgt = (item.rgt + 2) if item.rgt > (lft - 1)
        item.lft = (item.lft + 2) if item.lft > (lft - 1)
      end

      atts = build_menu_item_attributes(title, url, options).merge({:lft => lft, :rgt => rgt})

      menu_items.build(atts)
    end
def item(title, url = '#', options = {})
      raise 'item third parameter expects a Hash' unless options.kind_of?(Hash)

      prev_item = menu_items.last

      if prev_item.parent == true # This came from root or dropdown
        lft = prev_item.lft + 1 # Go down. from lft
        rgt = prev_item.rgt + 1
      else
        lft = prev_item.rgt + 1 # Go accross, from rgt
        rgt = prev_item.rgt + 2
      end

      menu_items.each do |item|
        item.rgt = (item.rgt + 2) if item.rgt > (lft - 1)
        item.lft = (item.lft + 2) if item.lft > (lft - 1)
      end

      atts = build_menu_item_attributes(title, url, options).merge({:lft => lft, :rgt => rgt})

      menu_items.build(atts)
    end
The URL parameter can be:
 - an Effective::Page object
 - the symbol :divider
 - a symbol or string that ends with _path
 - or a string that is the url