Andy Boot
12/19/2023, 11:48 AMvar BlogItems = Umbraco.ContentAtXPath("//blogItem").OrderByDescending(x => x.Value<DateTime>("newsDate"));
No doubt others may see this same issue with their upgrades if using a similar implementation. Any clues as to what I can do to resolve the error?
Thanks! 🙂Matt Wise
12/19/2023, 12:46 PMMatt Wise
12/19/2023, 12:46 PMMatt Wise
12/19/2023, 12:47 PMAndy Boot
12/19/2023, 2:25 PMvar currentPage = Umbraco.AssignedContentItem;
var home = currentPage.AncestorOrSelf<Homepage>();
var blogItems = home.Descendants(BlogItem.ModelTypeAlias).OfType<BlogItem>().OrderByDescending(x => x.NewsDate);
Perhaps the error is there is lure you into a sense of doubt so it forces you into refactoring your code 😅