def obtain_the_permalink(check = nil, render_inline = true)
      site_url = Setting.get('site_url')
      post = obtain_record(check)

      return '' if post.blank?

      article_url = Setting.get('articles_slug')

      url =
        if post.post_type == 'post'
           site_url("#{article_url}#{post.structured_url}")
        else
          site_url("#{post.structured_url}")
        end

      if render_inline
        render :inline => url
      else
        url
      end

    end
def obtain_the_permalink(check = nil, render_inline = true)
      site_url = Setting.get('site_url')
      post = obtain_record(check)

      return '' if post.blank?

      article_url = Setting.get('articles_slug')

      url =
        if post.post_type == 'post'
           site_url("#{article_url}#{post.structured_url}")
        else
          site_url("#{post.structured_url}")
        end

      if render_inline
        render :inline => url
      else
        url
      end

    end
returns the link to the given post
 Params:
 +check+:: ID, post_slug, or post_title - if this is nil it will use the @content variable (the current page)
 +render+:: wether to render the link straight on to the page or return the link in a string