The model item passed into the dictionary is of type 'Sitecore.Mvc.Presentation.RenderingModel', but this dictionary requires a model item of type 'xxx.models.Sitecore.IPage'.
I get above error if I statically load this like:
@Html.Sitecore().ViewRendering("~/Views/xxx/Generic/PageIntro.cshtml")
If I create a "View Rendering" item in Sitecore and load it from Presentation Details dynamically it works okay.
View I am trying to load "PageIntro" is a GlassView
Why is this?
@Html.Partial("~/Views/xxx/Generic/PageIntro.cshtml", Model)
assuming that Model is the same what is defined in the containing page.