ModelsBuilder generates IPublishedContent
or IEnumerable<IPublishedContent>
for single allowed type
#15266
Replies: 2 comments 3 replies
-
I think this will be a breaking change, and it might even be too late to fix for Umbraco 13 😢 But I think it would make good sense to fix for the next major where we're still allowed to make breaking changes. Also, the problem isn't really ModelsBuilder itself, but the property value type returned by the MNTP's property value converter. For now, you can either use @callumbwhyte's Super Value Converters package or my own Limbo Multinode Treepicker (I may have had a look or two at Callum's code). Both packages also support compositions, so if you allow two content types sharing the same composition, the generated property value type will be |
Beta Was this translation helpful? Give feedback.
-
I've been wanting this forever - sorry for not speaking up :) The sooner we can get this, the better. |
Beta Was this translation helpful? Give feedback.
-
I don't recall if this was different in past, but I noticed for MNTP configured as single picker and a specific type it generates
IPublishedContent
and if multipickerIEnumerable<IPublishedContent>
.If only a single content type is allowed, would it be possible to generate the specific type
T
orIEnumerable<T>
instead? e.g.NewsArticle
orIEnumerable<NewsArticle>
?Beta Was this translation helpful? Give feedback.
All reactions