A wrapper property-editor (for Umbraco) that lets you pick a custom/alternative ValueConverter
for a specified data-type.
Let's say that you have a property that is using a Content Picker editor, when you come to use the property on the frontend of the website, say with ModelsBuilder, the value's object-type would be an IPublishedContent
. However, if you wanted to only use the raw value, e.g. a string
of the Content's UDI, then your options are to either make an additional call to value.GetUdi()
, or use a Custom Value Converter - to swap the default Content Picker value converter with a plain-text value converter.
In terms of ModelsBuilder, this would change the property's object-type from an IPublishedContent
to a string
.
This is just one example, many more advanced combinations could be achieved.
Please note, currently you can only install a package from the NuGet package repository.
dotnet add package Our.Umbraco.Community.CustomValueConverter
Copyright © Lee Kelleher.
All source code is licensed under the Mozilla Public License.
The package logo uses the Replace icon (by Arthur Shlain) icon from the Noun Project, licensed under CC BY 3.0 US.