API Questions on Kentico API.
Version 6.x > API > How to fire some custom method on every page load? View modes: 
User avatar
Member
Member
vasiliy.ivanov1975-gmail - 4/9/2013 5:17:34 AM
   
How to fire some custom method on every page load?
Hello!
I need to fire some custom method on every page loading. I use templates build on portal engine, so can not use code file.

I reviewed the following info:
Code customization in Kentico CMS 6,
Global events,
but I've not found the event which fires when regular page loads (there are some events bound on administering pages activity, not on regular website pages).

So, the question is what's the proper way to implement the activity I need?
Thanks in advance!

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 4/9/2013 11:09:36 PM
   
RE:How to fire some custom method on every page load?
In the /CMSPages/PortalTemplate.aspx you could modify the code behind and put your method there but also note if Kentico updates that page, it will overwrite your code.

User avatar
Member
Member
vasiliy.ivanov1975-gmail - 4/15/2013 3:12:37 AM
   
RE:How to fire some custom method on every page load?
to FroggEye, kentico_janh:

Thank you, this is what I need.

User avatar
Kentico Support
Kentico Support
kentico_janh - 4/11/2013 2:33:32 PM
   
RE:How to fire some custom method on every page load?
Hello,

You can also take advantage of the \App_Code\Application\CMSAppBase.cs file where methods like CMSBeginRequest can be used to run your custom code, however the PortalTemplate would be a better place for this.

Best regards,
Jan Hermann