def do_hierarchy_templating(type)

      case type
      when 'archive'

        if template_exists?("archive")
          render :template => "themes/#{current_theme}/archive." + get_theme_ext
        elsif template_exists?("category")
          render :template => "themes/#{current_theme}/category." + get_theme_ext
        else
          render :template => "themes/#{current_theme}/page." + get_theme_ext
        end

      when 'category'

        if template_exists?("category")
          render :template => "themes/#{current_theme}/category." + get_theme_ext
        else
          render :template => "themes/#{current_theme}/page." + get_theme_ext
        end

      when 'search'

        if template_exists?("category")
          render :template => "themes/#{current_theme}/search." + get_theme_ext
        else
          render :tempalte => "themes/#{current_theme}/page." + get_theme_ext
        end

      end

    end
def do_hierarchy_templating(type)

      case type
      when 'archive'

        if template_exists?("archive")
          render :template => "themes/#{current_theme}/archive." + get_theme_ext
        elsif template_exists?("category")
          render :template => "themes/#{current_theme}/category." + get_theme_ext
        else
          render :template => "themes/#{current_theme}/page." + get_theme_ext
        end

      when 'category'

        if template_exists?("category")
          render :template => "themes/#{current_theme}/category." + get_theme_ext
        else
          render :template => "themes/#{current_theme}/page." + get_theme_ext
        end

      when 'search'

        if template_exists?("category")
          render :template => "themes/#{current_theme}/search." + get_theme_ext
        else
          render :tempalte => "themes/#{current_theme}/page." + get_theme_ext
        end

      end

    end
checks for the top level file, but returns the file that it can actually use
 Params:
 +type+:: type of