Copied to clipboard

Flag this post as spam?

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


  • Luke 110 posts 255 karma points
    Oct 22, 2014 @ 11:22
    Luke
    0

    Event Handler

    I have written a class that extends ApplicationEventHandler in order to catch the publish event of certain document types.

    I am struggling to find the documentation for V7. I originally used Document.AfterPublish but noticed this is obsolete. As such I used Umbraco.Core.Services.ContentService.Published += Content_Published; I'm I correct to use this?

    Also I placed the class in the App_Code folder, any other suggestions on where to place the class? (in terms of standards)

    Thank you as always!

  • Andy Butland 373 posts 2057 karma points MVP 4x hq c-trib
    Oct 22, 2014 @ 17:33
    Andy Butland
    0

    That looks right to me - here's the direct link to the documentation you are after.

    App_Code is fine, particularly if you are working outside of Visual Studio.  If you are using VS.Net though, I'd suggest looking at creating you code in a separate project that you reference from your web project.  That way you can benefit more from compile time checking and intellisense.

    Andy

  • Luke 110 posts 255 karma points
    Oct 22, 2014 @ 17:35
    Luke
    0

    Thank you Andy, very much appreciated!

  • 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