R – SharePoint does not find the custom RenderingTemplate

controltemplatessharepointwss

So I've created a custom RenderingTemplate and deployed it to CONTROLTEMPLATES\MyControlTemplates\

It basically dictates how a custom content type that i've created should be rendered when displayed. For that I've added this:

<FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
  <Display>CustomDispForm</Display>
</FormTemplates>

However, SharePoint does not find my custom RenderingTemplate when it's located in a subdirectory of CONTROLTEMPLATES. But if I move it to the root of CONTROLTEMPLATES\ SharePoint will find it.

According to documentation SharePoint should also look in subdirectories but this seems not to be the case. So is this a bug maybe? I'd like to see if I've missed something because I really prefer putting custom stuff in root/<Custom> directories.

Thanks.

Best Answer

I have noticed the same behaviour when putting control templates in a custom directory. You are right, SharePoint is supposed to look in subdirectories by default as well (the exact location in the config files eludes me at the moment) but it does not seem to do so.

I loaded my templates programatically, perhaps this is an option for you as well? You can find more information here: http://www.reversealchemy.net/2008/09/01/loading-sharepoint-templates-from-a-different-location/

Regards, Erik

Related Topic