I am porting a U5 site to 4.11 and am having some problems getting the Model object working.
'Umbraco.Web.Models.RenderModel'
does not contain a definition for 'PrimaryHeader' and no extension
method 'PrimaryHeader' accepting a first argument of type
'Umbraco.Web.Models.RenderModel' could be found
I have the following, but I get the error above from the Model...
Umbraco 4.11 MVC Error
I am porting a U5 site to 4.11 and am having some problems getting the Model object working.
'Umbraco.Web.Models.RenderModel' does not contain a definition for 'PrimaryHeader' and no extension method 'PrimaryHeader' accepting a first argument of type 'Umbraco.Web.Models.RenderModel' could be found
I have the following, but I get the error above from the Model...
}
@section PageTitle
{
@Model.PrimaryHeader
}
<section id="primary">
@Umbraco.Field("bodyText", insertBefore: "<p>", insertAfter: "</p>", convertLineBreaks: true, removeParagraphTags: true)
<div id="logoLinkArea">
I've managed to get this working using...
@Model.Content.GetProperty("PrimaryHeader").Value
Is there a better way than this? This seems very longwinded
According to the docs, you should be able to use @CurrentPage when using dynamics. See here.
Cheers,
/Dirk
Thanks Dirk - These docs should help me a lot.
is working on a reply...