Try our conversational search powered by Generative AI!

Attach provider for page requests



Im wondering how to attach a provider to run before a page is rendered. I want to check if a page is of a certain page type and if it is I then want to handle it with my logic. Anyone has an example?

Mar 06, 2014 13:40

I can also point out that if a page dosent have a view/template I want to handle this too.

Mar 06, 2014 13:43

One way is to hook up an eventhandler to EPiServer.Web.TemplateResolver.TemplateResolving (or TemplateResolved) and there set which template to use. See

You can get the instance of TemplateResolver from IOC container.

Mar 06, 2014 16:32
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.