You need to hookup the event deleting. With the delete event the node is already deleted. With the deleting event it's right before he delete the node.
Thanks Marcel - on further investigation (helped by your tip), i was using the wrong event anyway - I needed the ContentService.Trashing event which fires when you 'delete' a node (which doesn't really delete but moves it to the recycle bin!)
ContentService.Deleted e.Cancel = true throws error
I'm adding in a check to prevent the deletion of certain items:
but this throws and error: This event argument class does not support cancelling
Any ideas?
For now I'm throwing an error to cancel and show in the dashboard, but would like a more elegant solution!
Also, while we're there, how do i show a friendly error page in the dashboard?
thanks in advance
Ian
Hello TikTakToe,
You need to hookup the event deleting. With the delete event the node is already deleted. With the deleting event it's right before he delete the node.
Marcel
Thanks Marcel - on further investigation (helped by your tip), i was using the wrong event anyway - I needed the ContentService.Trashing event which fires when you 'delete' a node (which doesn't really delete but moves it to the recycle bin!)
is working on a reply...