Stopping people deleting content/media which is in use.
Hi guys,
Is there anyway to stop people deleting media or content (for example when a doc type has a content picker or media picker) when the content/media is in use?
I currently wouldn't know about any other solution than using the api and checking whether a content or media item is being referenced on any document. Might be a painful process as you'd need to know how the id could be stored in the cached xml...
Stopping people deleting content/media which is in use.
Hi guys,
Is there anyway to stop people deleting media or content (for example when a doc type has a content picker or media picker) when the content/media is in use?
Would I have to use the API to do this?
Thanks
Scott
Hi Scott,
I currently wouldn't know about any other solution than using the api and checking whether a content or media item is being referenced on any document. Might be a painful process as you'd need to know how the id could be stored in the cached xml...
Cheers,
/Dirk
Thanks Dirk,
Can you point me in the correct direction for actually extending the delete event?
Thanks
Scott
You'd have to build an event handler that subscribes to delete events on media/content.
Some wiki pages on the subject can be found starting from here: http://our.umbraco.org/wiki/reference/api-cheatsheet/using-applicationbase-to-register-events
Cheers,
/Dirk
Thats great Dirk, exaclty the direction I needed :)
And now to find out if/how I can stop the animation in the tree :S
After delete
Thanks
Scott
is working on a reply...