Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm working with Umbraco 9, rc3 for a new project of mine. And I can't find a way to make ModelsBuilder works for children elements in my main page.
I have a Blog page, where I can use the typed model thanks to the @inherits directive on top of the View.
However, when I try to typed manually my blogPosts, I need to provide a IPublishedValueFallback and I just can't make it works somehow. I tried passing null but it fails when a property is optional.
Here is the kind of code I would like to make it work, based on what I've been doing in Umbraco 8:
var blogposts = blogList.Children().Select(x => new Blogpost(x));
Thanks in advance for any help.
You could use blogList.Children().OfType<BlogPost>()
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted