Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sean Dooley 289 posts 528 karma points
    Jan 04, 2023 @ 13:57
    Sean Dooley
    0

    Block List Item notification?

    I know it is possible to add a notification for when a piece of content is published, however can a notification be added when a content editor has added a block list item and clicks the submit button?

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Jan 04, 2023 @ 14:12
    Huw Reddick
    0

    You should be able to use a content save notifcation and check the type for Block list

    BlockListSaveHandle : INotificationHandler<ContentSavingNotification>
    {
    public void Handle(ContentSavingNotification notification)
    {
    
        foreach (var entity in notification.SavedEntities)
        {
    
            foreach (var property in entity.Properties)
            {
                if (property.PropertyType.PropertyEditorAlias == "Umbraco.BlockList")
                { ...
    
  • Sean Dooley 289 posts 528 karma points
    Feb 07, 2023 @ 15:04
    Sean Dooley
    0

    From what I understand of the code snippet, that is only triggered when the node is saved. If so, this makes it tricky to indicate to the Content Editor what the notification is in relation to i.e. a field within a block list item, within a block list editor field.

Please Sign in or register to post replies

Write your reply to:

Draft