Example #1
0
        //AJAX: Admin/Blog/SEO/<PostSerial>
        public ActionResult SEO(Guid id)
        {
            ContentPage page = new ContentPage(id);
            SEO         seo  = page.seo;

            ViewBag.TypeOG    = seo.GetOGOptions(seo.ogType);
            ViewBag.PostURL   = "/admin/pages/seo";
            ViewBag.ImageBase = "/blog";
            SEOViewModel seoViewModel = new SEOViewModel(seo);

            return(PartialView("_SEO", seoViewModel));
        }
        //AJAX: Admin/Listing/SEO/<ListingSerial>
        public ActionResult SEO(int id)
        {
            News news = new News(id);
            SEO  seo  = news.seo;

            ViewBag.TypeOG    = seo.GetOGOptions(seo.ogType);
            ViewBag.PostURL   = "/admin/contentnews/updateseo/" + news.NewsSerial;
            ViewBag.ImageBase = "/img/listing";
            SEOViewModel seoViewModel = new SEOViewModel(seo);

            if (string.IsNullOrEmpty(seoViewModel.MetaTitle))
            {
                seoViewModel.MetaTitle = news.Headline;
            }
            if (string.IsNullOrEmpty(seoViewModel.MetaDescription))
            {
                seoViewModel.MetaDescription = news.ShortDescription;
            }
            return(PartialView("_SEO", seoViewModel));
        }
Example #3
0
        //AJAX: Admin/Blog/SEO/<PostSerial>
        public ActionResult SEO(int id)
        {
            BlogPost blogPost = new BlogPost(id);
            SEO      seo      = blogPost.seo;

            ViewBag.TypeOG    = seo.GetOGOptions(seo.ogType);
            ViewBag.PostURL   = "/admin/blog/seo";
            ViewBag.ImageBase = "/blog";
            SEOViewModel seoViewModel = new SEOViewModel(seo);

            if (string.IsNullOrEmpty(seoViewModel.MetaTitle))
            {
                seoViewModel.MetaTitle = blogPost.Title;
            }
            if (string.IsNullOrEmpty(seoViewModel.MetaDescription))
            {
                seoViewModel.MetaDescription = blogPost.Description;
            }

            return(PartialView("_SEO", seoViewModel));
        }