SaaS CMS has officially launched! Learn more now.

Web Form template path not set automaticly



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

Jun 11, 2015 9:30

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 -

I know that post applies to content area, but template registration is unified.

Jun 11, 2015 9:43


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:

Edited, Jun 16, 2015 13:38

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?

Jun 16, 2015 14:03

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:

It's focus on Contentarea, but it applies to pages as well.

Jun 16, 2015 14:57
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.