_frank456
07/10/2023, 2:31 PMpublic void Handle(ContentSavingNotification notification)
{
IContent? entity = notification.SavedEntities.SingleOrDefault();
if (entity is null)
{
return;
}
foreach (var prop in entity.Properties)
{
// map properties from block grid to a model
// custom validation
}
}
Patrick de Mooij
07/11/2023, 7:06 AMentity.GetValue<Type>("alias")
just like you do on the IPublishedContent itemsD_Inventor
07/11/2023, 7:10 AMnull
or an exception. Which exact types, I'm not sureD_Inventor
07/11/2023, 7:13 AMUmbraco.Cms.Core.Models.Blocks.BlockValue
with the method that Patrick shared. I'm not sure if you can input that type as type parameter or if you have to grab it as string and then convert it with a json serializer, but that way, you can get the raw model that is saved to the database.Jemayn
07/11/2023, 7:33 AMD_Inventor
07/11/2023, 7:44 AMPropertyValueConverterCollection
_frank456
07/11/2023, 11:18 AM