The property solutionsNavigationImages has images selected yet the property is null when I try to access it in my view. As I understand it the above is correct so what else could be causing the property to be null.
The issue here is that the DittoMultipleMediaPickerConverter will return a bunch of IPublishedContent (media) objects... but trying to convert that to a string will return null.
The solution for this is to have a class/model that can represent the media item. See James South's reply on another post:
Issue with DittoMultipleMediaPickerConverter returning null
I'm trying to get a list of images from a multi media picker using the DittoMultipleMediaPickerConverter but it seems to be returning null.
This is my code
The property solutionsNavigationImages has images selected yet the property is null when I try to access it in my view. As I understand it the above is correct so what else could be causing the property to be null.
Hi Suzy,
What values are you expecting back for the property?
The property-type is
List<string>
, what string values are you expecting to be in the list?Thanks,
- Lee
Given the other mentions on the forum of the MultipleMediaPickerConverter I assumed it would give a list of the image URLs.
The issue here is that the
DittoMultipleMediaPickerConverter
will return a bunch ofIPublishedContent
(media) objects... but trying to convert that to astring
will return null.The solution for this is to have a class/model that can represent the media item. See James South's reply on another post:
https://our.umbraco.org/projects/developer-tools/ditto/ditto-feedback/65149-TypeConverter-not-being-fired#comment-220766
Cheers,
- Lee
ah I see.
Thanks for the help Lee.
is working on a reply...