/// <summary>
        /// Inits the helpers.
        /// </summary>
        public override void InitHelpers()
        {
            base.InitHelpers();
            SitecoreContext  = IoC.SitecoreContextFactory.Default.GetSitecoreContext();
            GlassHtml        = SitecoreContext.GlassHtml;
            RenderingContext = new RenderingContextMvcWrapper();

            if (Model == null && this.ViewData.Model == null)
            {
                this.ViewData.Model = GetModel();
            }
        }
示例#2
0
        /// <summary>
        /// Inits the helpers.
        /// </summary>
        public override void InitHelpers()
        {
            base.InitHelpers();
            SitecoreContext  = Sc.SitecoreContext.GetFromHttpContext();
            GlassHtml        = new GlassHtml(SitecoreContext);
            RenderingContext = new RenderingContextMvcWrapper();

            if (Model == null && this.ViewData.Model == null)
            {
                this.ViewData.Model = GetModel();
            }
        }