bgunnarsson / BG-Icon-Picker

Icon picker for Umbraco v7 and v8
4 stars 4 forks source link

Addition of a property converter for Models builder #4

Closed Matthew-Wise closed 5 years ago

Matthew-Wise commented 5 years ago

Hi,

Just about to write a converter for it as we use models builder. Just wanted to raise an issue in case someone else needs it.

Ill add it as a reply shortly and look to add it properly at a later date

Matt

Matthew-Wise commented 5 years ago

Nothing more than telling models builder its a string instead of an object.

    [PropertyValueType(typeof(string))]
    public class BgIconPickerValueConverter : PropertyValueConverterBase
    {
        public override bool IsConverter(PublishedPropertyType propertyType)
        {
            return propertyType.PropertyEditorAlias.Equals("bgIconPicker");
        }
    }
bgunnarsson commented 5 years ago

Hi @Matthew-Wise this looks promising, I'll add it to the readme, thank you for your help!