I am an umbraco newbie. I created a new document type with a simple string, colour property, like below.
However, when I created a new VisualStudio razor view for a template for this document type, it obviously doesn't know what MyFavouriteColour content model is, so I am unable to use it.
Using the Umbraco UI however, things work fine but I want to work with visual studio only, instead of using umbraco UI. Any help greatly appreciated, thanks.
@using Umbraco.Core;
@using Umbraco.Core.Models;
@using Umbraco.Core.Services;
@using ContentModels = Umbraco.Web.PublishedContentModels;
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage<ContentModels.MyFavouriteColour>
@{
ViewBag.Title = "title";
//Layout = "_Layout";
}
<h2>title</h2>
@Umbraco.Field("favoriteColor")