Extending core property editors
s
I am looking for some documentation / blog posts about extending existing property editors. I am trying to add an extra field to the media picker and really don't want to copy over the default files and edit these. Does anyone know if it is possible?
a
We're doing this for our custom media picker. You can find the related files for this here (the two files at the bottom): https://github.com/limbo-works/Limbo.Umbraco.MediaPicker/tree/v1/main/src/Limbo.Umbraco.MediaPicker/PropertyEditors
Notice that with the way that properties are discovered in C#, properties added to your own class will be shown before those inherited from a base class. Umbraco doesn't support specifying a custom sort order for each property.
s
Thanks Anders!
a
If the sorting of the fields does matter, you can use the configuration editor and do something with the
Fields
property. IIRC it's a list: https://github.com/limbo-works/Limbo.Umbraco.MediaPicker/blob/v1/main/src/Limbo.Umbraco.MediaPicker/PropertyEditors/LimboMediaPickerWithCropsConfigurationEditor.cs#L20
s
@Anders Bjerner Would you by any chance know if it is possible to extend / override the FileSystemProvider as well, but only for some media types? Currently we are using Azure Blob Storage for our media but now also need to reference media in our DAM system. The plan is to have "virtual" media nodes that holds an ID of the file in our DAM system and whenever that media item is used, I need to pull the URL from the DAM system instead of the Umbraco URL.
a
I imagine it's possible to copy the existing media provider, and then make the relevant changes. But it's not something I've done my self
10 Views