Custom base page

Posted by Community Admin on 03-Aug-2018 13:09

Custom base page

All Replies

Posted by Community Admin on 23-Mar-2011 00:00
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
Posted by Community Admin on 23-Mar-2011 00:00
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
Posted by Community Admin on 23-Mar-2011 00:00
Thanks for the swift reply Ivan.
Posted by Community Admin on 05-Jul-2011 00:00
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.
Posted by Community Admin on 06-Jul-2011 00:00
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
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
This thread is closed