Copied to clipboard

Flag this post as spam?

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


  • SinkyPars 132 posts 175 karma points
    Sep 09, 2010 @ 10:40
    SinkyPars
    0

    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

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 09, 2010 @ 10:47
    Dirk De Grave
    0

    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

  • SinkyPars 132 posts 175 karma points
    Sep 09, 2010 @ 10:58
    SinkyPars
    0

    Thanks Dirk,

    Can you point me in the correct direction for actually extending the delete event?

    Thanks

     

    Scott

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 09, 2010 @ 11:01
    Dirk De Grave
    0

    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

  • SinkyPars 132 posts 175 karma points
    Sep 09, 2010 @ 11:58
    SinkyPars
    0

    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

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies