def route_index_page(params)

      if defined?(params[:search]) && !params[:search].blank?

        # make the content avalible to the view
        gloalize Post.where("(post_title LIKE :p or post_slug LIKE :p2 or post_content LIKE :p3) AND (post_type != 'autosave') AND (post_date <= CURRENT_TIMESTAMP)", { p: "%#{params[:search]}%", p2: "%#{params[:search]}%", p3: "%#{params[:search]}%" }).page(params[:page]).per(Setting.get('pagination_per_fe'))

        # add breadcrumbs to the hash
        add_breadcrumb I18n.t("generic.home"), :root_path, :title => I18n.t("generic.home")
        add_breadcrumb I18n.t("generic.search"), "/"

        # template Hierarchy
        do_hierarchy_templating('search')

      else

        @content = Post.find_by_id(Setting.get('home_page'))
        render_404 and return if @content.blank? || @content.post_status != 'Published'
        # make the content avalible to the view
        gloalize @content
        render_template 'home'

      end

    end
def route_index_page(params)

      if defined?(params[:search]) && !params[:search].blank?

        # make the content avalible to the view
        gloalize Post.where("(post_title LIKE :p or post_slug LIKE :p2 or post_content LIKE :p3) AND (post_type != 'autosave') AND (post_date <= CURRENT_TIMESTAMP)", { p: "%#{params[:search]}%", p2: "%#{params[:search]}%", p3: "%#{params[:search]}%" }).page(params[:page]).per(Setting.get('pagination_per_fe'))

        # add breadcrumbs to the hash
        add_breadcrumb I18n.t("generic.home"), :root_path, :title => I18n.t("generic.home")
        add_breadcrumb I18n.t("generic.search"), "/"

        # template Hierarchy
        do_hierarchy_templating('search')

      else

        @content = Post.find_by_id(Setting.get('home_page'))
        render_404 and return if @content.blank? || @content.post_status != 'Published'
        # make the content avalible to the view
        gloalize @content
        render_template 'home'

      end

    end
renders the homepage that is set in the admin panel - unless it has search parameters,
 it will render the search results page if it does have search parameters.
 Params:
 +params+:: all the current parameters. This is mainly used for the search results