public ActionResult TourPerspectives(string tourpermalink, int page = 1)
        {
            SEOToolStaticPage SEOTool = _seoToolStaticPageQueryService.FindSEOToolStaticPageByPermalink(tourpermalink);

            if (SEOTool != null)
            {
                ViewBag.FocusKeyword    = SEOTool.FocusKeyword;
                ViewBag.MetaDescription = SEOTool.MetaDescription;
                ViewBag.Title           = SEOTool.SEOTitle;
            }

            var perspectiveposts = _perspectiveService.PostByTour(tourpermalink);

            var blog     = perspectiveposts.Paged(page, DefaultPerPage, "UpdatedAt desc");
            var allTours = _perspectiveService.AllTours().ToList();

            var viewModel = new LatestPerspectivePost
            {
                Count                 = perspectiveposts.Count(),
                PerspectivePosts      = blog.ToList(),
                Tours                 = allTours,
                selectedtourpermalink = tourpermalink,
                PagingInfo            = new PagingInfo
                {
                    CurrentPage = page,
                    PerPage     = DefaultPerPage,
                    TotalItems  = perspectiveposts.Count(),
                }
                //,
                //Comment = new Models.Comments.CommentEdit()
            };

            return(View(viewModel));
        }
        public void Add(SEOToolStaticPageUpdate seoToolUpdate)
        {
            var seoTool = new SEOToolStaticPage
            {
                FocusKeyword    = seoToolUpdate.FocusKeyword,
                MetaDescription = seoToolUpdate.MetaDescription,
                SEOTitle        = seoToolUpdate.SEOTitle,
                Permalink       = seoToolUpdate.Permalink
            };

            _seoToolRepo.Add(seoTool);
        }
        public ActionResult Show(string permalink)
        {
            SEOToolStaticPage SEOTool = _seoToolStaticPageQueryService.FindSEOToolStaticPageByPermalink(permalink);

            if (SEOTool != null)
            {
                ViewBag.FocusKeyword    = SEOTool.FocusKeyword;
                ViewBag.MetaDescription = SEOTool.MetaDescription;
                ViewBag.Title           = SEOTool.SEOTitle;
            }
            return(View(permalink));
        }
示例#4
0
        public ActionResult Experiences()
        {
            SEOToolStaticPage SEOTool = _seoToolStaticPageQueryService.FindSEOToolStaticPageByPermalink("experiences");

            if (SEOTool != null)
            {
                ViewBag.FocusKeyword    = SEOTool.FocusKeyword;
                ViewBag.MetaDescription = SEOTool.MetaDescription;
                ViewBag.Title           = SEOTool.SEOTitle;
            }

            var categories = _categoryQueryService.All();



            return(View(new CategoryShow
            {
                Categories = categories.ToList()
            }));
        }
        public ActionResult Index()
        {
            SEOToolStaticPage SEOTool = _seoToolStaticPageQueryService.FindSEOToolStaticPageByPermalink("b-giftcards");

            if (SEOTool != null)
            {
                ViewBag.FocusKeyword    = SEOTool.FocusKeyword;
                ViewBag.MetaDescription = SEOTool.MetaDescription;
                ViewBag.Title           = SEOTool.SEOTitle;
            }


            var giftCards = _giftCardService.All();

            return(View(new GiftCardsIndex
            {
                Count = giftCards.Count(),
                GiftCards = Mapper.Map <List <GiftCard> >(giftCards)
            }));
        }
        public ActionResult Perspectives()
        {
            SEOToolStaticPage SEOTool = _seoToolStaticPageQueryService.FindSEOToolStaticPageByPermalink("perspectives");

            if (SEOTool != null)
            {
                ViewBag.FocusKeyword    = SEOTool.FocusKeyword;
                ViewBag.MetaDescription = SEOTool.MetaDescription;
                ViewBag.Title           = SEOTool.SEOTitle;
            }

            var blog     = _perspectiveService.LatestPost().ToList();
            var allTours = _perspectiveService.AllTours().ToList();

            return(View(new LatestPerspectivePost
            {
                Tours = allTours,
                PerspectivePosts = blog,
                //Comment = new Models.Comments.CommentEdit()
            }));
        }
        public ActionResult Index()
        {
            SEOToolStaticPage SEOTool = _seoToolStaticPageQueryService.FindSEOToolStaticPageByPermalink("home");

            Session["LogoUrl"] = _organizationService.FindOrganization(UserContext.Organization.Id).LogoImageURL;
            Session["AltText"] = _organizationService.FindOrganization(UserContext.Organization.Id).LogoImageAltText;

            if (SEOTool != null)
            {
                ViewBag.FocusKeyword    = SEOTool.FocusKeyword;
                ViewBag.MetaDescription = SEOTool.MetaDescription;
                ViewBag.Title           = SEOTool.SEOTitle;
            }

            var categories = _categoryService.All();

            return(View(new CategoryShow
            {
                Categories = categories.ToList()
            }));
        }