London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
It's a little different depending on if you're using MVC or Web Forms. In both cases you need to inherit from the correct base page.
ASP.NET Web Forms
TemplatePage<T> and UserControlBase<T> (where T is of type PageData)
ASP.NET MVC
PageControllerBase<T>
EPiServer will then automatically detect the connection between the two on start up and set the correct page/controller for that page type.
Hope this helps
Frederik
Thanks for your repsonse.
It's ASP.Net web form .. And i already did that. I tried with and empty website with only one pagetype and one template but EPiServer didn't attach the template to the pagetype (Only detect it when i added the path in admin mode).
Take a look at this post for more details: http://world.episerver.com/Blogs/Johan-Bjornfot/Dates1/2012/9/EPiServer-7--Rendering-of-content/
In EPiServer 6 I was able to define PageType classes and assign the template path in the same class using PageTypeBuilder.
Now in EPiserver 7 using the ContentType I can create the PageType class but i can't find a way to attach the web template path in the class definition.
How can i add the template path in code to be attached with the PageType so that i don't have to assign it manually in admin mode?