Is this a valid use case for property value converters?
I'm currently working on a application that will use the content delivery API.
However, a lot of the data provided is not quite in the form we'd like it.
Would using the IPropertyValueConverter/IDeliveryApiPropertyValueConverter interfaces to morph content on specific properties or DataTypes (as in, a specific editor config) be a valid use case or a horrible unsupported hack?
Example of what I mean:
public bool IsConverter(IPublishedPropertyType propertyType)
{
//Or some other way of finding the specific data type.
var typeId = _dataTypeService
.GetAll()
.FirstOrDefault(x => x.Name == "Article - Multinode Treepicker - Related")?.Id;
if (propertyType.DataType.Id == typeId )
{
return true;
}
return false;
}
Is this a valid use case for property value converters?
I'm currently working on a application that will use the content delivery API. However, a lot of the data provided is not quite in the form we'd like it.
Would using the
IPropertyValueConverter
/IDeliveryApiPropertyValueConverter
interfaces to morph content on specific properties or DataTypes (as in, a specific editor config) be a valid use case or a horrible unsupported hack?Example of what I mean:
I know it works, but is it kosher?
is working on a reply...