Quantcast
Channel: ActiveTopics
Viewing all articles
Browse latest Browse all 72689

Custom Media property problem

$
0
0
I try to use a custom Media property. But I get: Object not set to an instance of an object. The x.GetPropertyValue doesn't find the custom Media properties at all. Does anyone know how to go about this? I use ver 6.1.5 var rootMedia = Umbraco.TypedMediaAtRoot(); var rootFiles = rootMedia.Select(x => x) .Where(x => x.DocumentTypeAlias == "File" && x.GetPropertyValue("umbracoExtension").ToString().Contains("pdf")); var descendantFiles = rootMedia.SelectMany(x => x.Descendants()) .Where(x => x.DocumentTypeAlias == "File" && x.GetPropertyValue("umbracoExtension").ToString().Contains("pdf")); var oFiles = rootFiles.Union(descendantFiles) .Where(x => x.GetPropertyValue("documentMetaData").ToString().Contains(metadata_id)) .OrderByDescending(x => x.CreateDate);

Viewing all articles
Browse latest Browse all 72689

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>