def render_template(name)
      if !@content.post_template.blank?

        # check if the template file actually exists
        if template_exists?("template-#{@content.post_template.downcase}")

          render :template => "themes/#{current_theme}/template-#{@content.post_template.downcase}." + get_theme_ext

        else

          # check if a file with the given name exists
          if template_exists?(name)
            render :template => "themes/#{current_theme}/#{name}." + get_theme_ext
          elsif template_exists?("page")
            # if not use the page.html.erb template which has to be included in the theme
            render :template => "themes/#{current_theme}/page." + get_theme_ext
          else
            render :inline => I18n.t("helpers.routing_helper.render_template.template_error")
          end

        end

      else

        # check if a file with the given name exists
        if template_exists?(name)
          render :template => "themes/#{current_theme}/#{name}." + get_theme_ext
        elsif template_exists?("page")
          # if not use the page.html.erb template which has to be included in the theme
          render :template => "themes/#{current_theme}/page." + get_theme_ext
        else
          render :inline => I18n.t("helpers.routing_helper.render_template.template_error")
        end

      end

    end
def render_template(name)
      if !@content.post_template.blank?

        # check if the template file actually exists
        if template_exists?("template-#{@content.post_template.downcase}")

          render :template => "themes/#{current_theme}/template-#{@content.post_template.downcase}." + get_theme_ext

        else

          # check if a file with the given name exists
          if template_exists?(name)
            render :template => "themes/#{current_theme}/#{name}." + get_theme_ext
          elsif template_exists?("page")
            # if not use the page.html.erb template which has to be included in the theme
            render :template => "themes/#{current_theme}/page." + get_theme_ext
          else
            render :inline => I18n.t("helpers.routing_helper.render_template.template_error")
          end

        end

      else

        # check if a file with the given name exists
        if template_exists?(name)
          render :template => "themes/#{current_theme}/#{name}." + get_theme_ext
        elsif template_exists?("page")
          # if not use the page.html.erb template which has to be included in the theme
          render :template => "themes/#{current_theme}/page." + get_theme_ext
        else
          render :inline => I18n.t("helpers.routing_helper.render_template.template_error")
        end

      end

    end
changes the view to use the given template if it doesn't exist it will just use the page.html.erb
 the template file is set in the admin panel on each individual page.
 Params:
 +name+:: the template file to use.