-if menu_item_valid_to_show(menu_item, @lang, Time.now)
  -@count = @count + 1
  -img_url = menu_item.image_file.file.square.url if menu_item.image_file


  -if !@new_site
    =link_to menu_item_url(menu_item), :class => "article_search" do
  
      .image
        =image_tag img_url
  
  
      .description
        -fil = []
      
        %h3 Page
  
        %h2= menu_item.menu_content.lang_pages.find_by_lang_site_id(@lang.id).title
    
        %p
          -if menu_item.ancestors

            -for mi in menu_item.ancestors.reverse 
              -fil << mi.menu_item_langs.find_by_lang_site_id(@lang.id).name
            

          =fil.join("> ")
        
      .clear

    -if menu_item.image_file and menu_item.image_file.photograph

      -@page_images_credits << menu_item.image_file.photograph
  
  -else
    =link_to menu_item_url(menu_item), :class => "article_search" do

      .image{:style => "background-image:url('#{img_url}');"}



      .description
        -fil = []
    
        

        %h2
          -if menu_item.menu_content and menu_item.menu_content_type == "Page" and menu_item.menu_content.page_type_id == 3 and menu_item.parent
            =menu_item.parent.menu_content.lang_pages.find_by_lang_site_id(@lang.id).title
            ="-"
          = menu_item.menu_content.lang_pages.find_by_lang_site_id(@lang.id).title
        .desc
          =qit "Page"
          %br
          %p
            = menu_item.menu_content.lang_pages.find_by_lang_site_id(@lang.id).description.truncate(120, separator: ' ')
        
      
      .clear

    -if menu_item.image_file and menu_item.image_file.photograph

      -@page_images_credits << menu_item.image_file.photograph
  