def show_url(params)

      post = Post.find(params[:id])
      article_url = Setting.get('articles_slug')
      url = '' 

      # if the post is an article. Prepend the url with the article url
      if post.post_type == 'post'
        url = "/#{article_url}/#{post.post_slug}?admin_preview=true"
      else
        url += "#{post.structured_url}?admin_preview=true"
      end

      url

    end
def show_url(params)

      post = Post.find(params[:id])
      article_url = Setting.get('articles_slug')
      url = '' 

      # if the post is an article. Prepend the url with the article url
      if post.post_type == 'post'
        url = "/#{article_url}/#{post.post_slug}?admin_preview=true"
      else
        url += "#{post.structured_url}?admin_preview=true"
      end

      url

    end
is used to find out if the requested is an article or a page
 if it is a post it will prepend the url with the article url
 Params:
 +params+:: all the current parameters