Hello,
You will need to use custom code to set the template only on one of your sites. You can either modify the EditForm page which generates the a new document interface. You would need to change this line of code (
~\CMSModules\Content\CMSDesk\Edit\Edit.aspx.cs -> line 257):
// Set default template ID
formElem.DefaultPageTemplateID = templateId > 0 ? templateId : ci.ClassDefaultPageTemplateID;From my point of view a better way how to accomplish it is to use the CustomTreeNodeHandler class. In general, the custom handler (CustomDataHandler, CustomTreeNodeHandler etc.) gives you ability to execute custom code when some
CMS event occurs. You can use for example the OnAfterInsert event that gets executed after a new document is inserted to the database to change the
TreeNode.DocumentPageTemplateID property to an appropriate value based on the current site.
If you want more information about the
CustomTreeNodeHandler class and how to add it to your project, please visit following links:
Event handling overview,
Treenode handlerBest regards,
Michal Legen