Custom base page
Hola!
There may be some obvious way or info that I'm missing but how do I go about implementing a "custom base page" in Sitefinity 4. Kinda like I always did replacing what kinda page cmsentrypoint.aspx inherited from in 3.x. I kinda like doing some stuff like setting themes programatically, authorization yada yada there.
Anyone know right off the bat?
//Andreas
Hello Andreas,
In Sitefinity 4.0 we use ASP.NET Routing
msdn.microsoft.com/.../cc668201.aspx
All page requests are processed by PageRouteHandler, so you can implement a custom handler that inherits from it and inject your logic.
ObjectFactory.Container.RegisterType<PageRouteHandler, CustomRouteHandler>();
We also use inversion of control, so this is the other option to executed some custom code. This could be done through ObjectFactory class and its methods
Greetings,
Ivan Dimitrov
the Telerik team
Thanks for the swift reply Ivan.
Hey,
I've been trying to find this particular overload for ObjectFactory.Container.RegisterType, but I have not been able to find it. Has something changed in the latest version? Thanks for your help.
Hi Ryan,
ObjectFactory.Container.RegisterType is an extension of IUnityContainer (Telerik.Microsoft.Practices.Unity) and most probably you are missing a reference.
All the best,
Ivan Dimitrov
the Telerik team