Ejemplo n.º 1
0
        protected override object GetModel()
        {
            if (Tracker.Current == null || Tracker.Current.Interaction == null) //todo: missing !this.DemoStateService.IsDemoEnabled
            {
                return(null);
            }

            var explorerContext        = DependencyResolver.Current.GetService <IExplorerContext>();
            var isInExperienceExplorer = explorerContext?.IsExplorerMode() ?? false;

            if (Context.Site.DisplayMode != DisplayMode.Normal || WebEditUtility.IsDebugActive(Context.Site) || isInExperienceExplorer)
            {
                return(null);
            }

            return(_sidebarRepository.GetModel());
        }
Ejemplo n.º 2
0
        public ActionResult ExperienceData()
        {
            if (Tracker.Current == null || Tracker.Current.Interaction == null || !this.DemoStateService.IsDemoEnabled)
            {
                return(null);
            }
            var explorerContext        = DependencyResolver.Current.GetService <IExplorerContext>();
            var isInExperienceExplorer = explorerContext?.IsExplorerMode() ?? false;

            if (Context.Site.DisplayMode != DisplayMode.Normal || WebEditUtility.IsDebugActive(Context.Site) || isInExperienceExplorer)
            {
                return(new EmptyResult());
            }

            var experienceData = ServiceLocator.ServiceProvider.GetService <ExperienceData>();

            return(this.View(experienceData));
        }
Ejemplo n.º 3
0
        public ActionResult ExperienceData()
        {
            if (Tracker.Current == null || Tracker.Current.Interaction == null || this.IsDemoDisabled)
            {
                return(null);
            }
            if (Context.Site.DisplayMode != DisplayMode.Normal || ModuleManager.IsExpViewModeActive || WebEditUtility.IsDebugActive(Context.Site))
            {
                return(new EmptyResult());
            }

            return(this.View(new ExperienceData(this.contactProfileProvider, this.profileProvider)));
        }
Ejemplo n.º 4
0
 public static bool NoOverlay(this SiteContext siteContext) => siteContext.DisplayMode == DisplayMode.Normal && !ModuleManager.IsExpViewModeActive && !WebEditUtility.IsDebugActive(siteContext);