ASPX templates
Version 6.x > ASPX templates > Handling Global Events View modes: 
User avatar
Member
Member
david.thornton-pop - 6/5/2012 10:35:04 AM
   
Handling Global Events
I'm trying to work with the new Global Events in Kentico 6.x by following the documentation at: http://devnet.kentico.com/docs/devguide/index.html?event_handlers_overview.htm, but I'm running into an issue that is preventing me to continue on.

My project is setup as a Website Project rather than a Website, so I don't have an "App_Code" folder, although Kentico has created the "Old_App_Code" folder. In here, there is a CMSModuleLoader.cs file, which looks to be the base of the Global Events code, though it's missing the [CustomDocumentEvents] attribute as well as the Init() override, etc.

When attempting to add the CustomDocumentEvents attribute to the class, Visual Studio is unable to resolve this. I've got both the CMS.TreeEngine and CMS.SettingsProvider references added to the .cs file as in the documentation, but still no CustomDocumentEvents.

Anybody know what I'm missing here? I'd really like to not have to go back to the CustomEventHandler project as it's deprecated now in lieu of Global Events.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/5/2012 11:01:34 AM
   
RE:Handling Global Events
Hi,

I guess you meant web application and not web site project. However, it should work this way. Could you please describe the exact setup? Also, our CTO mentioned it his blog post (New event handlers in 6).

You should be also able use it in the "old way" as mentioned in the documentation.

Best regards,
Juraj Ondrus

User avatar
Member
Member
david.thornton-pop - 6/5/2012 11:34:58 AM
   
RE:Handling Global Events
Thanks, the blog post by your CTO helped explain it a little further and it's working now.