def index
      core__set_header_active_page_title(LANGUAGES[:lato_blog][:pages][:posts])
      # find correct status to show
      @posts_status = 'published'
      @posts_status = 'drafted' if params[:status] && params[:status] === 'drafted'
      @posts_status = 'deleted' if params[:status] && params[:status] === 'deleted'
      # find informations data
      @posts_informations = {
        published_length: LatoBlog::Post.published.where(meta_language: cookies[:lato_blog__current_language]).length,
        drafted_length: LatoBlog::Post.drafted.where(meta_language: cookies[:lato_blog__current_language]).length,
        deleted_length: LatoBlog::Post.deleted.where(meta_language: cookies[:lato_blog__current_language]).length
      }
      # find posts to show
      @posts = LatoBlog::Post.where(meta_status: @posts_status,
      meta_language: cookies[:lato_blog__current_language]).joins(:post_parent).order('lato_blog_post_parents.publication_datetime DESC')

      @widget_index_posts = core__widgets_index(@posts, search: 'title', pagination: 10)
    end
def index
      core__set_header_active_page_title(LANGUAGES[:lato_blog][:pages][:posts])
      # find correct status to show
      @posts_status = 'published'
      @posts_status = 'drafted' if params[:status] && params[:status] === 'drafted'
      @posts_status = 'deleted' if params[:status] && params[:status] === 'deleted'
      # find informations data
      @posts_informations = {
        published_length: LatoBlog::Post.published.where(meta_language: cookies[:lato_blog__current_language]).length,
        drafted_length: LatoBlog::Post.drafted.where(meta_language: cookies[:lato_blog__current_language]).length,
        deleted_length: LatoBlog::Post.deleted.where(meta_language: cookies[:lato_blog__current_language]).length
      }
      # find posts to show
      @posts = LatoBlog::Post.where(meta_status: @posts_status,
      meta_language: cookies[:lato_blog__current_language]).joins(:post_parent).order('lato_blog_post_parents.publication_datetime DESC')

      @widget_index_posts = core__widgets_index(@posts, search: 'title', pagination: 10)
    end
This function shows the list of published posts.