MediaLibraryPicker and Title Part

Topics: Customizing Orchard
Jul 2 at 7:58 PM
Edited Jul 2 at 8:20 PM
For some reason the Title part of my Blog Posts is getting overridden by the Title of the MediaLibraryPicker's image name. My MediaLibraryPicker.cshtml override looks like this:
@using Orchard.ContentManagement
@using Orchard.MediaLibrary.Fields
@using Orchard.Utility.Extensions;

@{
    var field = (MediaLibraryPickerField) Model.ContentField;
    string name = field.DisplayName;
    var contents = field.MediaParts;
}
<section class="media-library-picker-field media-library-picker-field-@name.HtmlClassify()">
    @*<h3>@name</h3>*@
    @foreach(var content in contents) {
    <div>
        @Display(BuildDisplay(content, "Detail"))
    </div>
    }
</section>
And if you look at the attached screen you'll that my <title> attribute is coming from the image name instead of the Content items Title Part.

Image

Any suggestions would be greatly appreciated.

Thanks!
Toby