
-MenuItem.where(:parent_id => nil, :enabled => true, :visible => true).order(:position).each do |menu_item|
  =menu_item_link(menu_item)

-if 1 == 2
  %ul
    -MenuItem.where(:parent_id => nil, :enabled => true, :visible => true, :menu_id => Menu.find_by_slug("principal").id).order(:position).each do |menu_item|
      -description = ""
      -description = menu_item.menu_content.description if menu_item.menu_content and menu_item.menu_content_type == "Page"
      %li
        =link_to sanitize("#{menu_item.name}"),menu_item_path(:url => menu_item.url), :class => menu_item.slug.to_s+"_menu"+(" active" if @menu_item and (@menu_item == menu_item or @menu_item.ancestors.include?(menu_item))).to_s
  
  
        -if menu_item.parent_id
          -if menu_item.ancestors.reverse[0]
            -first_level_menu = menu_item.ancestors.reverse[0]

        -else

          -first_level_menu = menu_item

        -if first_level_menu.children.size > 0  
          %ul
            -first_level_menu.children.where(:enabled => true, :visible => true).order(:position).each do |menu_item|

              %li
                =menu_item_link(menu_item)