-content_for :sidebar do

  -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
  -if first_level_menu.children.count > 0
    .square.green
      %h3=menu_item_link(first_level_menu)
      %ul
        -first_level_menu.children.where(:enabled => true, :visible => true).order(:position).each do |menu_item|
    
          %li
            =menu_item_link(menu_item)
            -if menu_item.children.where(:enabled => true, :visible => true).size > 0
              %ul
                -menu_item.children.where(:enabled => true, :visible => true).order(:position).each do |menu_item|
                  %li=menu_item_link(menu_item)
          
          
          
          
  

=render :partial => "public/blocks/block", :locals => {:block => @menu_item.menu_content.blocks[0]}

