def render_page(url, status)
      # get content - if the admin isn't logged in your add the extra status requirements
      if !current_user.blank? && !params[:admin_preview].blank? && params[:admin_preview] == 'true'
        @content = Post.where("post_type = 'page' AND post_visible = 'Y' AND (post_status = 'Published' OR post_status = 'Draft')").find_by_structured_url("/#{url}")
      else
        @content = Post.where(status + " AND post_type = 'page' AND post_visible = 'Y'").find_by_structured_url("/#{url}")
      end

      # add a breadcrumb for each of its parents by running through each segment
      url.split('/').each do |u|
        p = Post.where(:post_type => 'page').find_by_post_slug(u)
        if p
          add_breadcrumb "#{p.post_title.capitalize}", "#{p.structured_url}", :title => "Back to #{p.post_title.capitalize}"
        end
      end
      # if content if blank return a 404
      render_404 and return if @content.blank?
      gloalize @content

      # if the content id is the same as the home page redirect to the home page do not render the content
      if !Setting.get('home_page').blank? && Setting.get('home_page').to_i == @content.id
        redirect_to site_url
      else
        render_template 'page'
      end

    end
def render_page(url, status)
      # get content - if the admin isn't logged in your add the extra status requirements
      if !current_user.blank? && !params[:admin_preview].blank? && params[:admin_preview] == 'true'
        @content = Post.where("post_type = 'page' AND post_visible = 'Y' AND (post_status = 'Published' OR post_status = 'Draft')").find_by_structured_url("/#{url}")
      else
        @content = Post.where(status + " AND post_type = 'page' AND post_visible = 'Y'").find_by_structured_url("/#{url}")
      end

      # add a breadcrumb for each of its parents by running through each segment
      url.split('/').each do |u|
        p = Post.where(:post_type => 'page').find_by_post_slug(u)
        if p
          add_breadcrumb "#{p.post_title.capitalize}", "#{p.structured_url}", :title => "Back to #{p.post_title.capitalize}"
        end
      end
      # if content if blank return a 404
      render_404 and return if @content.blank?
      gloalize @content

      # if the content id is the same as the home page redirect to the home page do not render the content
      if !Setting.get('home_page').blank? && Setting.get('home_page').to_i == @content.id
        redirect_to site_url
      else
        render_template 'page'
      end

    end
renders a standard post page
 Params:
 +url+:: the url that has been requested by the user
 +status+:: is passed in from the above function - just sets the standard status this is needed for the admin