When I'm trying to get back a media item to object that is returned is of type:
'Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedMediaCache+DictionaryPublishedContent'
I've tried to find some information around this but don't seem to be having much luck. Can anyone share some information about why this type is returned and how it can be managed?
Unable to get Media ID
Hi guys,
When I'm trying to get back a media item to object that is returned is of type: 'Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedMediaCache+DictionaryPublishedContent'
I've tried to find some information around this but don't seem to be having much luck. Can anyone share some information about why this type is returned and how it can be managed?
Thanks,
Andy
Can you show your code please?
Hi Brendan,
There's not much to show tbh, I've got a media picker with the alias 'bannerImage' and then using:
@Umbraco.Field("bannerImage") returns Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedMediaCache+DictionaryPublishedContent
@Model.Content.GetProperty("bannerImage") returns Umbraco.Web.PublishedCache.XmlPublishedCache.XmlPublishedProperty
@Model.Content.GetPropertyValue("bannerImage") returns Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedMediaCache+DictionaryPublishedContent
No matter what I try its returning these types rather than IPublishedContent, I've tried casting it also but that hasn't helped.
Thanks,
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.