/// <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(); } }
/// <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(); } }