public ActionResult Detail(int?BlogPostID, string FriendlyUrl)
        {
            if (BlogPostID == null)
            {
                throw new HttpException(404, "Page Not Found");                    //TUMBLR POST CASE
            }
            var _Model = _BlogService.GetDetail(Request.Url.Authority, (int)BlogPostID, FriendlyUrl);

            if (_Model == null)
            {
                throw new HttpException(404, "Page Not Found");
            }

            ViewBag.BlogContent = _ContentService.Get(Request.Url.Authority, "blog");

            ViewBag.Title           = _Model.Title;
            ViewBag.MetaDescription = _Model.ContentPreview;

            return(View(_Model));
        }
Exemple #2
0
 public IHttpActionResult GetDetail(int SiteID, string Url, int BlogPostID, string FriendlyUrl)
 {
     return(Ok(_BlogService.GetDetail(SiteID, Url, BlogPostID, FriendlyUrl)));
 }