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
Package version 2.0.5, Umbraco version 7.1.4
I've created a document type "Test" with only one property "multinodetreepicker", which is (obviously) a multi node tree picker, configured to select content with no further filters or limitations.
The following code returns the PublishedPropertyType of the property:
var itemType = PublishedContentType.Get(PublishedItemType.Content, "Test");
var propertyType = itemType.GetPropertyType("multinodetreepicker");
Only... the ClrType property of the PublishedPropertyType is reported as being IPublishedContent - I would have thought it'd be IEnumerable<IPublishedContent>?
This messes with the ModelsBuilder package, because it translates the document type property to an IPublishedContent property instead of IEnumerable<IPublishedContent>. Can anything be done to fix this?
You need the value converters v2.1.0 to use with IPublishedContentModelFactory and Model Builder or Ditto. This does require Umbraco v7.1.5 (or v7.1.6).
Excellent! It works in 2.1.0 :) thank you.
You're welcome, also when your using strongly typed models you should set the web.config mode appsetting for a mini performance boost (of course you can't then use CurrentPage). Details at the bottom of this page
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted