views:

1158

answers:

2

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"&gt;
  <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.

+4  A: 

Hi,

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

A: 

I have custom rendering template in ascx file in CONTROLTEMPLATES folder I want to render that custom rendering template as toolbar in custom list view forms...

I have changed toolbartemplate property of view in schema.xml but it reads id from defaulttemplates.ascx while it does not read from customdefaulttemplates.ascx

How to give referece of customdefaulttemplates.ascx in schema.xml file of custom list definition so that I cam render custom toolbar...

Thankx

saumil