Value Mappers
Configuring value mappers in Umbraco UI Builder, the backoffice UI builder for Umbraco.
Defining a value mapper
// Example
public class MyValueMapper : ValueMapper
{
public override object EditorToModel(object input)
{
// Tweak the input and return mapped object
...
}
public override object ModelToEditor(object input)
{
// Tweak the input and return mapped object
...
}
}Setting a field value mapper
SetValueMapper<TMapperType>() : EditorFieldConfigBuilder<TEntityType, TValueType>
SetValueMapper(Type mapperType) : EditorFieldConfigBuilder<TEntityType, TValueType>
SetValueMapper(Mapper mapper) : EditorFieldConfigBuilder<TEntityType, TValueType>
Last updated
Was this helpful?