Ejemplo n.º 1
0
        public override ActionResult Index()
        {
            // detect language from browser settings
            if (!IsManaging)
            {
                var language = CurrentItem.SelectLanguage(Request.UserLanguages);
                if (language != null && language != CurrentItem)
                {
                    return(Redirect(language.Url));
                }

                if (CurrentItem.RedirectUrl != CurrentItem.Url)
                {
                    return(Redirect(CurrentItem.RedirectUrl));
                }
            }

            return(new EmptyResult()); // cannot display logical page
        }
Ejemplo n.º 2
0
        public override ActionResult Index()
        {
            AssertProductsLoaded();
            // detect language from browser settings
            if (!IsManaging)
            {
                var language = CurrentItem.SelectLanguage(Request.UserLanguages);
                if (language != null && language != CurrentItem)
                {
                    return(RedirectPermanent(language.Url));
                }

                if (CurrentItem.RedirectUrl != CurrentItem.Url)
                {
                    return(RedirectPermanent(CurrentItem.RedirectUrl));
                }
            }

            SetPageTitleSimple();
            return(View());
        }