2

I'm following this article (as well as different MSDN pages) and trying to add some custom template forms to my content type.

I think I'm doing all by the book, but for some reason wont deploy my version of the content type.

Instead of my XmlDocument I get the default one which is:

 <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
      <FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
        <Display>ListForm</Display>
        <Edit>ListForm</Edit>
        <New>ListForm</New>
      </FormTemplates>
    </XmlDocument>

The Display, Edit and New entries are not my own. ListForm is the default.

My .ascx just contains some div with text in it. Just a test. It's in the right place in the CONTROLTEMPLATES folder.

What am I missing? How can I deploy with my custom templates?

2 Answers 2

1
  1. That happened with me whenever there is an issue with your templates. I forgot what was my exact reason but there has to be some issue with your templates.

  2. Also, in order to override the templates, I realized, there is an Inherits attribute set to 'TRUE' in your definition for content type. Set that to 'FALSE' and it will pick your custom templates.

1
  • I'm marking this as the correct answer since the Inherits="FALSE" did the trick (unfortunately you loose the inherited fields so you have to add them by hand...). Seems this is a bug (social.technet.microsoft.com/Forums/en-US/…).
    – JohnDoDo
    Dec 7, 2011 at 13:42
0

I think that you use incorrect rendering template ID. You should specify this id in your template. look at the excample:

<SharePoint:RenderingTemplate ID="CustomContentTypeCreateForm" runat="server">

Then you should use this id in your schema.

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

In you case, I think, SharePoint looks for ListForm id and takes default template instead of your template.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.