Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Changing the Default Template of a new page as it is created View modes: 
User avatar
Member
Member
iweber - 7/30/2013 8:44:05 AM
   
Changing the Default Template of a new page as it is created
This must be a common issue so I'm wondering if any Kentico users have done something similar.

I would like to make a new default template for any document of type Product as it is created, so that the page automatically shows all data (because the template uses repeaters to display all of the data/content).

Might this have something to do with the CustomDocumentEventsAttribute class? I thought about looping through the tree structure of the site and changing all product documents to use a specific template, but this seems inefficient. Perhaps there is a way to do this as they are created.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 7/30/2013 9:15:50 AM
   
RE:Changing the Default Template of a new page as it is created
Hi,

In the document type definition in Site Manager -> Development -> Document types when you edit the document type, on the General tab there is "Default page template" setting. If you will set this, all the documents that are created with this type will use this template. this affects only newly created documents. Existing documents are not touched and they have to be modified either manually or using custom code.

Best regards,
Juraj Ondrus

User avatar
Member
Member
iweber - 7/30/2013 9:41:53 AM
   
RE:Changing the Default Template of a new page as it is created
I just found this myself a little while ago by mistake! I always thought there must be a setting in Kentico for it but I never happened to see it. Thank you Juraj.