EPiserver CMS 7.19.2
The template path is not set automaticly when compiled and released, nor on test or prod-server. Why?
Path = "/Templates/Public/Pages/StartPage/StartPage.aspx")]
GUID = "82871cdf-4a35-4026-8cf9-62fa331d7777",
GroupName = "FOO",
DisplayName = "StartPage Blocks",
Description = "",
Order = 200070,
AvailableInEditMode = true)]
public class FOOStartPage : StartPageBase
Am i doing something wrong?
The solution is upgraded från CMS 6 r2 PageTypeBuilder
What's inside template model repository for this type? (code may need to be tweaked, writting from head):
Is it so that usually template descriptors are added to template type (page, user control, etc) and not to page type definition? Otherwise you may need to provide "Type" to which register this template.
More info about scanning and registration process for template models you can found in my blog post series part 1 - http://blog.tech-fellow.net/2015/04/26/content-area-under-the-hood-part-1/
I know that post applies to content area, but template registration is unified.
The TemplateDescriptor attribute is only valid on template type (MVC controller, ASPX-page etc) as Valdis is saying and not on the ContentType definition. So you would have to add the attribute to your aspx code behind, like this:
[TemplateDescriptor(Path = "/Templates/Public/Pages/StartPage/StartPage.aspx")]
public partial class StartPage : TemplatePage<FOOStartPage>
You can find more info here:http://world.episerver.com/documentation/items/developers-guide/episerver-cms/7/content/pages-and-blocks/how-to/creating-page-templates-and-block-controls/#PageTemplate
yes, that works better, where did i get that from? i think it was the automatic upgrade from pagetypebuilder script. Probably i was suppose to move the TemplateDescriptor to the ASPX.
Still thought in Admin/contenttype/settings, no "Display Template" is filled in. But maybe that is legacy now?
Display Template regulates default template for the content type. It plays small role in template selection process. You can read more about that complex process in 2nd part of blog post series: http://blog.tech-fellow.net/2015/05/30/content-area-under-the-hood-part-2/
It's focus on Contentarea, but it applies to pages as well.