Im trying to make all razor views inherit from Umbraco.Web.Mvc.UmbracoTemplatePage
. So that I dont have to have @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
at the top of every page.
Adding Umbraco.Web.Mvc.UmbracoTemplatePage
to pageBaseType in the web.config in the Views folder kind of works..
Problem is that I want Model.Content to be static, but it becomes dynamic so I dont get any intellisence Is there a way to make it static (as it would be if I’ve added Umbraco.Web.Mvc.UmbracoTemplatePage at the top of the razor file)?
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="Umbraco.Web.Mvc.UmbracoTemplatePage">
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="Umbraco.Web" />
<add namespace="Umbraco.Core" />
<add namespace="Umbraco.Core.Models" />
<add namespace="Umbraco.Web.Mvc" />
<add namespace="Microsoft.Web.Helpers" />
<add namespace="umbraco" />
<add namespace="Examine" />
</namespaces>
</pages>
</system.web.webPages.razor>
This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/61391-set-all-razor-views-to-inherit-from-umbracowebmvcumbracotemplatepage