I noticed in the umbraco 8 standard template installation the following code:
@using Umbraco.Core.PropertyEditors
@inherits UmbracoViewPage
@{
Layout = null;
// Get basic design settings from the homepage
var home = (Home)Model.Root();
var font = home.Font;
var colorTheme = home.ColorTheme;
}
and then this:
<div class="nav-link--home">
<img class="logo-image" src="@home.SiteLogo.Url" alt="@home.Sitename">
</div>
}
Can someone explain this line for me:
var home = (Home)Model.Root();
Because in my own solution when I try the following:
@inherits Umbraco.Web.Mvc.UmbracoViewPage
@{
Layout = null;
var forside = (Forside)Model.Root();
}
and then
<img class="logo-image" src="@forside.Logo.Url" >
I get a compliation error that The type or namespace name 'Forside' could not be found.