Exemplo n.º 1
0
        public ActionResult LoadNextEstablishment(string establishmentUrl)
        {
            //Remove .html
            establishmentUrl = establishmentUrl.Remove(establishmentUrl.Length - 5, 5);

            var url = establishmentUrl.TrimStart('/').Split('/').Last();

            var establishment = RoteirosService.GetEstablishmentByUrl(url);

            return(PartialView("_EstablishmentItem", establishment));
        }
Exemplo n.º 2
0
        private ActionResult LoadEstablishment(string uf, string city, string category, string subCategory, string url)
        {
            var establishment = RoteirosService.GetEstablishmentByUrl(url);

            var model = new RoteirosEstablishments
            {
                //Base
                Title       = "Roteiros - Massa News",
                Description = "Roteiros. Saiba mais!",
                Robots      = "index, follow",
                Canonical   = $"{Constants.UrlWeb}/dev/roteiros",
                //Model
                Establishment = establishment
            };

            ViewBag.NavItems  = establishment.Categoria.GetEstablishments().Select(s => new NoticiaNavItem(s, s.Id == establishment.Id));
            ViewBag.ActiveNav = establishment.CategoriaPaiNome;

            return(View("Establishment", model));
        }