I have recently upgrade to 4.7.1 and I am pretty sure that this did not happen then. I am trying to render a image tag for a document type "MediaElement" that captures the "Media" and "Thumbnail". Media and Thumbnail are both files picked using the S3 plugin. However I am not getting the correct value back from the dynamicNode in razor.
The value of the element.PropertiesAsList[3] (which corresponds to the "Media" node is correct. Notice that the "-" has been removed from the InnerText of the element.Media version (causing invalid data). So when I try to render my node using this bit of razor, it renders an invalid value for the src of my image tag.
var mediaUrl = XDocument.Parse(element.Media.ToXml()).Element("value").Value;
var thumbnailUrl = XDocument.Parse(element.Thumbnail.ToXml()).Element("value").Value;
// This doesn't work either// var mediaUrl = element.Media.BaseElement.Value;// var thumbnailUrl = element.Thumbnail.BaseElement.Value;
Here is a snipped from the umbraco.config for this node
Dynamic Properties invalid in Razor
Hi,
I have recently upgrade to 4.7.1 and I am pretty sure that this did not happen then. I am trying to render a image tag for a document type "MediaElement" that captures the "Media" and "Thumbnail". Media and Thumbnail are both files picked using the S3 plugin. However I am not getting the correct value back from the dynamicNode in razor.
Here are the values that I am seeing in Razor:
The value of the element.PropertiesAsList[3] (which corresponds to the "Media" node is correct. Notice that the "-" has been removed from the InnerText of the element.Media version (causing invalid data). So when I try to render my node using this bit of razor, it renders an invalid value for the src of my image tag.
Here is a snipped from the umbraco.config for this node
Does anyone have any ideas about how I can fix this?
Thank you,
Justin
is working on a reply...