This project is read-only.

Problem to display a custom field type in MediaPickerField on view Parts.Common.Body.Summary

Topics: Core, Customizing Orchard, Troubleshooting, Writing modules, Writing themes
Mar 9, 2013 at 4:46 PM
Hello guys, I need to show my custom field and I am using the code below:
Orchard.ContentManagement.ContentItem contentItem = Model.ContentPart.BlogPost.ContentItem;
    var part = contentItem.Parts.FirstOrDefault(p => p is ContentPart && p.TypePartDefinition.PartDefinition.Name == "BlogPost");    
    var field = part.Fields.FirstOrDefault(f => f.Name == "ImagemCapa");
The problem is that the type MediaPickerField not exist in this context, so I can not get the Url property, what do I do?
Mar 9, 2013 at 8:58 PM
Add a reference.