(v13) Creating a notification handler to hide bloc...
# help-with-umbraco
c
Hey all, Just looking to create some logic in my baseline project in which I am attempting to hide a particular block in a blocklist property editor dependent on if a key within my appsettings is not present. Just looking for some pointers or examples of if anyone has achieved this in the past? To my knowledge, i believe it would be through the "SendingContentNotification" in which I would grab the property in the notification, loop through the properties to find my block list, then loop through the blocks in that property, removing the one that fails an if Check on that appsettings key. However, Im not sure "if" this is the right way to do it or where to begin writing this 😅 Any pointers are greatly appreciated!
j
You can probably lift a lot of the logic from https://github.com/LottePitcher/umbraco-admin-only-property This package has a custom property editor that shows only if you are admin
c
Thank you! I shall give it a look and a go!
a
And good to know, SendingContentNotification isnt available in V14
(yet)