IPublishedContent does not contain a definition for 'IsVisible'
Greetings.
Upgraded our site from 6.1.3 to 7.2.1 and having trouble getting things running. The error I can't solve is
CS1061: 'Umbraco.Core.Models.IPublishedContent' does not contain a
definition for 'IsVisible' and no extension method 'IsVisible'
accepting a first argument of type
'Umbraco.Core.Models.IPublishedContent' could be found (are you
missing a using directive or an assembly reference?)
I have a partial view like below. I get this error for .AncestorOrSelf(2), .IsVisible and .IsDocumentType.
@using Umbraco.Core.Models;
@inherits Umbraco.Web.Mvc.UmbracoViewPage<IPublishedContent>
@{
Layout = null;
var parent = Model.AncestorOrSelf(2);
}
@foreach (var node in parent.Children.Where(x => x.IsVisible() && !x.IsDocumentType("NewsArticle")))
{
//Logic here
}
Are there some breaking changes I am missing here? My online research is not yielding anything.
IPublishedContent does not contain a definition for 'IsVisible'
Greetings.
Upgraded our site from 6.1.3 to 7.2.1 and having trouble getting things running. The error I can't solve is
I have a partial view like below. I get this error for .AncestorOrSelf(2), .IsVisible and .IsDocumentType.
Are there some breaking changes I am missing here? My online research is not yielding anything.
Thanks!
Eric
Seems I found the issue. I needed to add the following using statement:
Although I include this in the web.config file in my Views folder, somehow it wasn't working.
is working on a reply...