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 256 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 422 posts 2334 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 256 karma points
    Oct 22, 2014 @ 17:35
    Luke
    0

    Thank you Andy, very much appreciated!

Please Sign in or register to post replies

Write your reply to:

Draft