In a sitecore mvc project created a .cshtml as mainlayout with the following code in it:
@using Sitecore.Mvc
@using Sitecore.Mvc.Presentation
@inherits Glass.Mapper.Sc.Web.Mvc.GlassView<project.MVC.Models.Shared.IPageBase>
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>SampleLayout</title>
</head>
<body>
<div>
<h1>Hello World</h1>
</div>
</body>
</html>
I assigned this as mainlayout to one of the item in Sitecore and previewed it. Following is the error displayed:
The model item passed into the dictionary is of type 'Sitecore.Mvc.Presentation.RenderingModel', but this dictionary requires a model item of type 'Project.MVC.Models.Shared.IPageBase'.