Hide field within widget

Topics: Customizing Orchard, General, Troubleshooting, Writing modules
May 7, 2014 at 11:53 AM
Hi All

I'm writing a custom widget for Orchard 1.8, the widget has a custom part that contains a MediaLibraryPickerField. I want to prevent this field from displaying on the frontend. I've tried to do this with the following placement.info file but can't seem to get it working.
    <Match ContentType="DHTSImageGalleryWidget">
        <Place
            Fields_MediaLibraryPicker="-"
            Parts_ImageGalleryWidget="Content"/>
    </Match>
Any Ideas?

Thanks
Ben
May 8, 2014 at 9:28 AM
I've currently worked around this by creating a alternate in my module named Fields.MediaLibraryPicker-ImageGalleryWidgetPart.cshtml with no content. However it'd be nice to swap this out for something in a placement file.

Any better ways?
May 8, 2014 at 7:37 PM
Why don't you use an alternate for whole widget instead?